public CabangListModel Get(CabangSearchFilter searchFilter) { CabangListFormData formData = new CabangListFormData(); SearchResult <CabangDTO> searchResult = cabangSearch.GetDataByFilter(searchFilter); return(new CabangListModel() { FormData = formData, SearchResult = searchResult }); }
public IHttpActionResult Search([FromUri] CabangSearchFilter filter) { ThrowIfUserHasNoRole(readRole); if (filter == null) { throw new KairosException("Missing search filter parameter"); } using (var cabangSearch = new CabangSearch(Db)) { var data = cabangSearch.GetDataByFilter(filter); return(Ok(new SuccessResponse(data))); } }