public SalonViewModel GetProfile(string username) { var salon = _salonRepository.Find(x => x.Account.Username.Equals(username)).FirstOrDefault(); if (salon != null) { return(new SalonViewModel { SalonId = salon.Id, Name = salon.Name, Phone = salon.Phone, Address = salon.Address, Email = salon.Email }); } else { return(null); } }