prjThree
### C#
interfacesEg
Min
- 1 aspDotNetCoreMvcStart
- 2 Add Routing capabilities : used to redirect req to controller and methods in controller
app.UseRouting();
app.MapControllerRoute(
name : "default",
pattern: "{controller=Home}/{action=Index}/{id}"};
);
- DI servcies needed by MapControllerRoute method using asp.net core's externsion method AddControllerWithViews
builder.Services.AddControllerWithViews();
Support for mvc framework added in asp.net core Program.cs file
Add controllr to handle request
- Create Folder Controller
- Add Controller > Emp controller > HomeController
- Every controller have base Controller class
- Every incoming request will be mapped to one of controller's action method in default case Index actin method
public IActionResult Index()
{
return View();
}
- Url : Name of controller / Name of Action method / Optional param of action method
- Simplifed actin mehod returning string /home/index Or root /
public string Index()
{
return "Hi";
}
https://www.youtube.com/watch?v=BzlPrVB_DwA
select * from HimrisScan.dbo.RegistrationsSummaryRepNew('04 ','01/01/2018','31/12/2018')