예제 #1
0
파일: Repository.cs 프로젝트: roma96/PSZRDB
 public IList <Employee> GetObjects()
 {
     using (var context = new LvivFilialDBContext(dbOptions))
     {
         return(context.Employee.ToList());
     }
 }
예제 #2
0
 public string GetObjects()
 {
     using (var context = new LvivFilialDBContext(dbOptions))
     {
         return(JsonConvert.SerializeObject(context.Employee.ToList()));
         //return context.Employee.ToList();
     }
 }
예제 #3
0
파일: Repository.cs 프로젝트: roma96/PSZRDB
 public void Update(Employee obj)
 {
     if (obj == null)
     {
         throw new ArgumentNullException();
     }
     using (var context = new LvivFilialDBContext(dbOptions))
     {
         context.Update(obj);
         context.SaveChanges();
     }
 }