예제 #1
0
 public void Create(DalRole dalrole)
 {
     context.Set<OrmRole>().Add(Maper.ToOrmRole(dalrole));            
 }
예제 #2
0
 public void Update(DalRole dalrole)
 {
     Maper.ToOrmRole(dalrole, context.Set<OrmRole>().Where(dbrole => dbrole.Name == dalrole.Name).FirstOrDefault());
 }
예제 #3
0
 internal static BllRole ToBllRole(DalRole dalrole)
 {
   if(dalrole!=null) return new BllRole()
     {
         Id = dalrole.Id,
         Name = dalrole.Name,
         Description = dalrole.Description
     };
   return null;
 }
예제 #4
0
 public void Delete(DalRole dalrole)
 {
     throw new NotImplementedException();
 }
예제 #5
0
 //для обновления
 internal static void ToOrmRole(DalRole dalrole, OrmRole inThisOrmRole)
 {
     inThisOrmRole.Name = dalrole.Name;
     inThisOrmRole.Description = dalrole.Description;
 }