Пример #1
0
 public bool Update(Model model)
 {
     try
     {
         context.Entry <Model>(model).State = EntityState.Modified;
         set = context.Set <Model>();
         return(true);
     }
     catch (Exception e)
     {
         return(false);
     }
 }
Пример #2
0
 public Repository()
 {
     context = new CourseworkDBContext();
     set     = context.Set <Model>();
 }