public async Task <IAddressRequest> Add(IAddressRequestAdd add) { var entry = await context.AddressRequests.AddAsync(MapToEntity(add)); await context.SaveChangesAsync(); return(entry.Entity); }
private AddressRequest MapToEntity(IAddressRequestAdd add) => new AddressRequest { City = add.City, Country = add.Country, IsActive = true, Number = add.Number, Province = add.Province, Street = add.Street, ZipCode = add.ZipCode };