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(); } } }
partial void DeleteRole(Role instance);
partial void UpdateRole(Role instance);
partial void InsertRole(Role instance);