public async Task <IActionResult> GetApartmentByEmail() { try { var apartments = await _apartmentService.GetApartmentByEmailAsync(); return(Ok(apartments)); } catch (DbUpdateConcurrencyException e) { return(BadRequest(e.Message)); } catch (Exception e) { return(BadRequest(e)); } }