public IHttpActionResult GetSearchMeets(SearchMeetViewModel model) { if (ModelState.IsValid) { var meets = meetRP.Search(model); return(Ok(meets.ToList())); } return(BadRequest(ModelState)); }
public List <Meet> GetMyMeets() { string userId = RequestContext.Principal.Identity.GetUserId(); SearchMeetViewModel model = new SearchMeetViewModel { SwimmerId = userId }; var meets = meetRP.Search(model); return(meets.ToList()); }