using (var context = new YourDbContext()) { var server = context.Servers.Find(1); // или FindOrDefault с последующей проверкой на null Response(new YourPacket(server)); } Code: C#