public async Task <bool> UpdateAsync(PersonDTO person) { var entity = PersonDTO.FromDto(person); _context.Entry(entity).State = EntityState.Modified; return(await SaveChangesAsync()); }
public async Task <bool> CreateAsync(PersonDTO person) { var entity = PersonDTO.FromDto(person); _context.Persons.Add(entity); return(await SaveChangesAsync()); }