public async Task <IActionResult> AddOwnerTenant([FromBody] AddOwnerTenantRequest request) { var ownertenant = request.ToDto(); await _personManager.AddOwnerTenantAsync(ownertenant); return(Created(Request.Path, ownertenant.WrapResponse(Request.Path))); }
public static OwnerTenantDto ToDto(this AddOwnerTenantRequest request) { return(new OwnerTenantDto { OccupantCount = request.OccupantCount, IsOwner = request.IsOwner, From = request.From, To = request.To, PersonId = request.PersonId, ApartmentId = request.ApartmentId }); }