public LogEvent GetLogEventByGuid(Guid guid) { LogEvent logEvent = null; using (var sqlConn = SqlConnectionProvider.GetConnection(AppConst.RantaMaster)) { var entity = logHeaderDal.GetLogByGuid(guid, sqlConn); logEvent = LogEventConvertor.ToModel(entity); } return(logEvent); }
public ActionResult Detail(string name) { Guid guid = Guid.Empty; if (Guid.TryParse(name, out guid)) { var model = logBusiness.GetLogEventByGuid(guid); if (model != null) { var viewModel = LogEventConvertor.ToViewModel(model); return(View(viewModel)); } else { return(Redirect("/")); } } else { return(Redirect("/")); } }