public bool CreateUserRole(UserRole instance) { if (instance.Id == 0) { Db.UserRole.InsertOnSubmit(instance); Db.UserRole.Context.SubmitChanges(); return true; } return false; }
public bool UpdateUserRole(UserRole instance) { UserRole cache = Db.UserRole.Where(p => p.Id == instance.Id).FirstOrDefault(); if (cache != null) { //TODO : Update fields for UserRole Db.UserRole.Context.SubmitChanges(); return true; } return false; }
partial void DeleteUserRole(UserRole instance);
partial void UpdateUserRole(UserRole instance);
partial void InsertUserRole(UserRole instance);
private void detach_UserRole(UserRole entity) { this.SendPropertyChanging(); entity.User = null; }
private void attach_UserRole(UserRole entity) { this.SendPropertyChanging(); entity.User = this; }