// Implementing the interface method public string GetDataFromBL() { // Accessing DL methods from BL - using interface of DL string dlData = _demoDl.GetDataFromDL(); if (!string.IsNullOrEmpty(dlData)) { return(dlData); // returning DL Data } return("This is from BL"); // returning BL Data }
public IActionResult Index() { try { // Controller ==>> DL // accessing directly as DL string x = _demoService.GetDataFromDL(); _logger.LogInformation(x); _logger.LogDebug("Index132", "Test Message"); return(View()); } catch (Exception ex) { throw ex; } }