public IEnumerable <Sms> GetSmsesOf(int lineId, DateTime from, DateTime to) { using (var contest = new CellularContext()) { return(contest.Sms.Where(s => s.LineId == lineId && s.)); } }
public void TestMethod1() { using (var context = new CellularContext()) { var e = context.Employees.First(); } }
public IEnumerable <Call> GetCallsOf(int lineId, DateTime from, DateTime to) { using (var context = new CellularContext()) { return(context.Calls.Where(c => c.LineId == lineId && c.CallDate >= from && c.CallDate <= to)); } }
public AddingClientResult AddNewClient(Client client) { using (var db = new CellularContext()) { if (db.Clients.Any(c => c.ClientId == client.ClientId)) { return new AddingClientResult(AddingClientFailureReason.) } db.Clients.Add(client); db.SaveChanges(); return(new AddingClientResult(client)); } }