public List <ViewtKeyWord> SearchKeyWordList(string sWord) { List <tKeyWord> list = Repository.SearchKeyWordList(sWord); List <ViewtKeyWord> model = new List <ViewtKeyWord>(); foreach (var item in list) { model.Add(ViewtKeyWord.ToViewModel(item)); } return(model); }
public List <ViewtKeyWord> GetPageList(string sWord, int page, int pagesize, out int count) { List <tKeyWord> list = Repository.GetPageList(sWord, page, pagesize, out count); List <ViewtKeyWord> model = new List <ViewtKeyWord>(); foreach (var item in list) { model.Add(ViewtKeyWord.ToViewModel(item)); } return(model); }
public ViewtKeyWord GetById(int id) { return(ViewtKeyWord.ToViewModel(Repository.Get(id))); }