Example #1
0
        public async Task <IActionResult> AddOwnerTenant([FromBody] AddOwnerTenantRequest request)
        {
            var ownertenant = request.ToDto();
            await _personManager.AddOwnerTenantAsync(ownertenant);

            return(Created(Request.Path, ownertenant.WrapResponse(Request.Path)));
        }
Example #2
0
 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
     });
 }