예제 #1
0
        public ResultViewModels <ResturantEditViewModel> AddResturant(ResturantEditViewModel ResturantEditView)
        {
            ResultViewModels <ResturantEditViewModel> result
                = new ResultViewModels <ResturantEditViewModel>();

            try
            {
                var restaurantTemp = resturantService.Add(ResturantEditView);
                if (restaurantTemp == null)
                {
                    result.Successed = false;
                    result.Message   = "Data is empty";
                }
                else
                {
                    result.Successed = true;

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

            return(result);
        }
예제 #2
0
        public ResturantEditViewModel AddResturant(ResturantEditViewModel ResturantEditView)
        {
            var Resturant = resturantService.Add(ResturantEditView);

            return(Resturant);
        }