コード例 #1
0
        public ResultViewModels <IEnumerable <ResturantPackageViewModel> > AllResturantPackages()
        {
            ResultViewModels <IEnumerable <ResturantPackageViewModel> > result
                = new ResultViewModels <IEnumerable <ResturantPackageViewModel> >();

            try
            {
                var resturantpackageTemp = resturantPackageService.GetAll();
                if (resturantpackageTemp == null)
                {
                    result.Successed = false;
                    result.Message   = "No Data Found";
                }
                else
                {
                    result.Successed = true;

                    result.Message = "All Data ound";
                    result.Data    = resturantpackageTemp;
                }
            }
            catch (Exception ex)
            {
                result.Successed = false;
                result.Message   = "Something Went Wrong !!";
            }

            return(result);
        }
コード例 #2
0
 public IEnumerable <ResturantPackageViewModel> AllResturantPackages()
 {
     return(resturantPackageService.GetAll());
 }