public async Task UpdateAsync(DtoAuthorInput input) { var @record = await _authorsRepository .GetAll() .Where(e => e.Id == input.Id) .FirstOrDefaultAsync(); if (@record == null) { throw new UserFriendlyException("Could not found the author, maybe it's deleted."); } var @author = Author.Update(input.Id, AbpSession.GetTenantId(), input.FirstName, input.LastName, input.Email); await _authorManager.UpdateAsync(@author); }
public async Task CreateAsync(DtoAuthorInput input) { var @author = Author.Create(AbpSession.GetTenantId(), input.FirstName, input.LastName, input.Email); await _authorManager.CreateAsync(@author); }