Esempio n. 1
0
        public async Task <IActionResult> InsertUpdateConsultant(Guid?Id)
        {
            //throw new Exception("Error in Details View");

            logger.LogTrace("Trace Log");
            logger.LogDebug("Debug Log");
            logger.LogInformation("Information Log");
            logger.LogWarning("Warning Log");
            logger.LogError("Error Log");
            logger.LogCritical("Critical Log");

            ConsultantVM consultantVM = new ConsultantVM();

            if (Id.HasValue && Id != Guid.Empty)
            {
                consultantVM = await _consultantRepository.GetConsultantDetail(new Guid(Id.ToString()));

                if (consultantVM == null)
                {
                    return(View("Index"));
                }
            }

            return(View(consultantVM));
        }