Esempio n. 1
0
        public ResultViewModels <TempleViewModel> GetTempleByID(int id)
        {
            ResultViewModels <TempleViewModel> result
                = new ResultViewModels <TempleViewModel>();

            try
            {
                var TempleTemp = TempleService.GetByID(id);
                if (TempleTemp == null)
                {
                    result.Successed = false;
                    result.Message   = "No Data Found";
                }
                else
                {
                    result.Successed = true;

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

            return(result);
        }
Esempio n. 2
0
 public TempleViewModel GetTempleByID(int id)
 {
     return(TempleService.GetByID(id));
 }