public async Task <IActionResult> Get() { var salonList = await salonRepository.GetAll(); if (salonList == null || salonList.Count == 0) { return(NoContent()); } return(Ok(salonList)); }
public async Task <IEnumerable <SalonViewModel> > GetAllSalon() { var salons = _salonRepository.GetAll().Select(s => new SalonViewModel { Id = s.AccountId, Name = s.Name, Address = s.Address, Phone = s.Phone, SalonId = s.Id, Email = s.Email }); return(salons); }