public IHttpActionResult BasicInfoSelectList(string region, string city_province) { try { SelectRepository repo = new SelectRepository(); SelectCollectionsViewModel select = repo.BasicInfoSelectLists(region, city_province); return Ok(select); } catch (Exception ex) { return BadRequest(ex.Message); } }
public IHttpActionResult BasicInfoWithSelectList(long id) { try { UserRepository userRepo = new UserRepository(); BasicViewModel model = userRepo.GetBasicInfo(id); SelectRepository repo = new SelectRepository(); SelectCollectionsViewModel select = repo.BasicInfoSelectLists(model.region, model.city_province); model.selectList = select; return Ok(model); } catch (Exception ex) { return BadRequest(ex.Message); } }