예제 #1
0
 public bool CreateRole(Role instance)
 {
     if (instance.ID == 0)
     {
         Db.Role.InsertOnSubmit(instance);
         Db.Role.Context.SubmitChanges();
         return true;
     }
     return false;
 }
예제 #2
0
 public bool UpdateRole(Role instance)
 {
     Role cache = Db.Role.FirstOrDefault(p => p.ID == instance.ID);
     if (instance.ID == 0)
     {
         cache.Name = instance.Name;
         cache.Code = instance.Code;
         Db.Role.Context.SubmitChanges();
         return true;
     }
     return false;
 }
예제 #3
0
 partial void UpdateRole(Role instance);
예제 #4
0
 partial void DeleteRole(Role instance);
예제 #5
0
 partial void InsertRole(Role instance);