public void InsertOrUpdate(tRole role) { if (role.IDRole == default(int)) { // New entity context.tRoles.InsertOnSubmit(role); } else { // Existing entity tRole userToUpdate = Find(role.IDRole); if (userToUpdate != null && userToUpdate.IDRole > 0) { userToUpdate.Name = role.Name; } } }
partial void DeletetRole(tRole instance);
partial void UpdatetRole(tRole instance);
partial void InserttRole(tRole instance);