public IList <Employee> GetObjects() { using (var context = new LvivFilialDBContext(dbOptions)) { return(context.Employee.ToList()); } }
public string GetObjects() { using (var context = new LvivFilialDBContext(dbOptions)) { return(JsonConvert.SerializeObject(context.Employee.ToList())); //return context.Employee.ToList(); } }
public void Update(Employee obj) { if (obj == null) { throw new ArgumentNullException(); } using (var context = new LvivFilialDBContext(dbOptions)) { context.Update(obj); context.SaveChanges(); } }