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; }
private void detach_UserRole(UserRole entity) { this.SendPropertyChanging(); entity.User = null; }
private void attach_UserRole(UserRole entity) { this.SendPropertyChanging(); entity.User = this; }
partial void DeleteUserRole(UserRole instance);
partial void UpdateUserRole(UserRole instance);
partial void InsertUserRole(UserRole instance);