Ejemplo n.º 1
0
        private async Task <SearchBusinessResponse> Get(Func <Task <IList <Business> > > action)
        {
            SearchBusinessResponse response = new SearchBusinessResponse();

            response.Businesses = await action();

            response.IsSuccessful = true;
            return(response);
        }
Ejemplo n.º 2
0
        public SearchBusinessResponse SearchBusiness(SearchBusinessRequest req)
        {
            SearchBusinessResponse res = new SearchBusinessResponse();

            using (BusinessDatabase da = new BusinessDatabase())
            {
                res.Businesses = da.SearchBusiness(req.Name);
            }
            res.IsSuccessful = true;

            return(res);
        }