public ActionResult SearchByUsername() { SearchByUsernameModel model = new SearchByUsernameModel(); model.UserList = new List <Domain.User.UserDO>(); return(View(model)); }
public ActionResult SearchByUsername(SearchByUsernameModel model) { if (model.SearchKeyword.Length >= 5) { model.UserList = UserBL.SearchByLikelyUsername(model.SearchKeyword); } else { model.UserList = UserBL.SearchByExactUsername(model.SearchKeyword); } return(View(model)); }