public ActionResult Index() { try { var mainMessages = new BLL.MainMessages(); ViewBag.Message = mainMessages.GetMessage(Messages.RequestSource.Web); } catch (Exception ex) { var message = $"There was an unexpected error. Please contact the suport team. Error: {ex.Message}"; Debug.WriteLine(message); ViewBag.Message = message; } return(View()); }
public ActionResult Index() { try { var mainMessages = new BLL.MainMessages(); ViewBag.Message = mainMessages.GetMessage(Messages.RequestSource.Web); } catch (Exception ex) { var message = $"There was an unexpected error. Please contact the suport team. Error: {ex.Message}"; Debug.WriteLine(message); ViewBag.Message = message; } return View(); }
public string GetMessage() { //Accessed through: http://localhost:64333/api/public/getmessage var result = string.Empty; try { var mainMessages = new BLL.MainMessages(); result = mainMessages.GetMessage(Messages.RequestSource.API); } catch (Exception ex) { var message = $"There was an unexpected error. Please contact the suport team. Error: {ex.Message}"; Debug.WriteLine(message); result = message; } return(result); }
public string GetMessage() { //Accessed through: http://localhost:64333/api/public/getmessage var result = string.Empty; try { var mainMessages = new BLL.MainMessages(); result = mainMessages.GetMessage(Messages.RequestSource.API); } catch (Exception ex) { var message = $"There was an unexpected error. Please contact the suport team. Error: {ex.Message}"; Debug.WriteLine(message); result = message; } return result; }