3
Answers

LocationController.CreateEdit(string) not all code path returns value

Ramco Ramco

Ramco Ramco

3y
356
1

Hi

  Error - LocationController.CreateEdit(string) not all code path returns value

[HttpGet]
        public ActionResult CreateEdit(string Id)
        {
            try
            {
                if (String.IsNullOrEmpty(Id))
                {
                    return PartialView("_CreateEdit", new Customer());
                }

                else
                {
                    return PartialView("_CreateEdit", dbLocation.GetById(Id));
                }
            }
            catch (Exception ex)
            {
                ExceptionLogging.SendExcepToDB(ex);
                TempData["Message"] = "Error Encountered.";
            }
        }

Thanks

Answers (3)