//********************************************************** //* Добавление новой роли //********************************************************** public static void AddRole(String rolename) { using (SandBoxDataContext db = new SandBoxDataContext()) { Role role = new Role { Name = rolename }; db.Roles.InsertOnSubmit(role); db.SubmitChanges(); } }
partial void DeleteRole(Role instance);
partial void UpdateRole(Role instance);
partial void InsertRole(Role instance);
private void detach_Roles(Role entity) { this.SendPropertyChanging(); entity.UsersInRole = null; }
private void attach_Roles(Role entity) { this.SendPropertyChanging(); entity.UsersInRole = this; }