Пример #1
0
 public override void CreateRole(string roleName)
 {
     using (Data.contentDataContext context = new Data.contentDataContext())
     {
         if (context.Roles.Where(p => p.Name == roleName).Count() <= 0)
         {
             Data.Role role = new Data.Role()
             {
                 Name = roleName
             };
             context.Roles.InsertOnSubmit(role);
             context.SubmitChanges();
         }
     }
 }
Пример #2
0
 partial void DeleteRole(Role instance);
Пример #3
0
 partial void UpdateRole(Role instance);
Пример #4
0
 partial void InsertRole(Role instance);