public ActionResult GetItineraries(string code, string urlname)
{
//globusapi/getitineraries
try
{
List<string> itineraryIDs = _itinerariesRepository.GetItineraries(code, urlname).ToList();
if(itineraryIDs != null && itineraryIDs.Count > 0)
return Json(itineraryIDs);
else
{
Log.Info($"No itineraries found in ProductsController. Url: {System.Web.HttpContext.Current.Request.Url}", this);
return Redirect("/404");
}
}
catch (Exception ex)
{
Log.Error($"Error in ProductController.GetItineraries. Url: {System.Web.HttpContext.Current.Request.Url}" + ex.Message, this);
Log.Info($"GetDepartureDetails: code {code} officeid {officeId} ", this);
return Redirect("/404");
}
}
=====
calling method name:
System.Diagnostics.StackTrace stackTrace = new StackTrace();
stackTrace.GetFrame(1).GetMethod().Name
No comments:
Post a Comment