public async Task <IActionResult> Get([FromBody] SearchViewModel model) { var gender = (int)model.Gender; if (gender == -1) { model.Gender = null; } float minFees, maxFees = 0; float.TryParse(model.MinFees, out minFees); float.TryParse(model.MaxFees, out maxFees); bool?isOnline = null; if (model.Isonline != -1) { isOnline = model.Isonline == 1; } var res = lawyerService.GetLawyers(model.ServiceId, model.Name, model.Specialization, model.Gender, model.Rating, minFees, maxFees, model.Prices, isOnline, model.Experiences); return(Ok(res)); }
public async Task <ActionResult <IEnumerable <Lawyer> > > SearchLawyers(string lawyerName, string lawyerSurname) { var response = await _myLawyerService.GetLawyers(lawyerName, lawyerSurname); return(response.ToList()); }
public IActionResult GetData() { return(Ok(lawyerService.GetLawyers())); }