public async Task CreateAsync(BRole role) { var dRole = role.ToDbRole(); await InsertAsync(dRole); role.Id = dRole.Id; }
public async Task UpdateAsync(BRole role) { var dRole = await GetAsync(role.Id); if (dRole != null) { await UpdateAsync(dRole); } else { throw new RoleReferenceNotFoundException("The role reference does not exist"); } }
public static DRole ToDbRole(this BRole role) => new DRole { Id = role.Id, Name = role.Name };
public async Task DeleteAsync(BRole role) { await DeleteAsync(role.Id); }