Question: How can I connect and code the HomeController.cs and Model between my StaffRepository.cs and at the HomePage the in Index.cshtml without JQuery but with Ajax
How can I connect and code the HomeController.cs and Model between my StaffRepository.cs and at the HomePage the in Index.cshtml
without JQuery but with Ajax
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DESCRIPTION
StaffRepository.cs contains these:
namespace Chegg.Infrastructure; public interface IStaffRepository { Staff Get(int id); } public class StaffRepository : IStaffRepository { public Staff Get(int id) { return AllStaff().First(x => x.Id == id); } private IEnumerable
Index.cshtml contains these:
@{ ViewData["Title"] = "Home Page"; } Staff List
Select to load
My file system is like this (sadly I could not upload here a photo so):
Main folder:
Chegg.Infrastructure folder
Chegg.UI folder
Chegg.sln Visual Studio Solution
etc.
In the Chegg.Infrastructure folder we can see:
bin folder
obj folder
Chegg.Infrastructure C# Project Source File
StaffRepository.cs C# Source File
etc.
In the Chegg.UI folder we can see the followings:
bin folder
Controllers folder
Models folder
obj folder
Properties folder
Views folder
www.root folder
etc.
Thanks so much for help with this example to me.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
