Ejemplo n.º 1
0
        public async Task <IActionResult> Get()
        {
            var salonList = await salonRepository.GetAll();

            if (salonList == null || salonList.Count == 0)
            {
                return(NoContent());
            }

            return(Ok(salonList));
        }
Ejemplo n.º 2
0
        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);
        }