|
I had to run extra configuration In addition to author's instruction 1. In nuget package manager console I ran "dotnet restore" 2. At the end, I opened applicationhost.config and changed the physical path point to my project location. eg. <virtualDirecto ry path="/" physicalPath="C :\xxx\Generic Repository Pattern in ASP.NET Core\C#\GR.Web" /> It worked for me. Hope this can help others who had the same problem like me. Thank you Sandeep, this is so beautiful code. I have a question: did you create a model and also create a model map manually? Because I see this pattern first time, could you tell me why did you use this pattern? Thanks.
Thanks Tiger Jin,These steps are awesome.I have an article for detail description. https://social.technet.microso ft.com/wiki/con tents/articles/ 36510.asp-net-c ore-generic-rep ository-pattern .aspx
Hi, I'm trying to implement your repository within my web project. I have a models folder where all the table classes DBContext and repositories are situated. I also added a BaseEntity class inwhich all my table classes inherit from. Now when I invoke my controller where I have instantiated the link to the Repository for my "User" class I get the following error thrown back from .net core: "InvalidOperationException: Unable to resolve service for type 'NetCoreAngular 2.Models.IRepos itory`1[NetCore Angular2.Models .User]' while attempting to activate 'NetCoreAngular 2.Controllers.S ampleDataContro ller'." Do you have any idea what could be causing this? Thank you
IMHO you should change solution name from "GenericReposotory.sln" to "GenericReposit ory.sln"
Here is the error I get: Detailed Error Information: Module IIS Web Core Notification Unknown Handler Not yet determined Error Code 0x80070015 Config Error Cannot read configuration file Config File \\?\E:\Sample\GenericReposotor y\GR.Web\web.co nfig Requested URL http://localhos t:59832/ Physical Path Logon Method Not yet determined Logon User Not yet determined Request Tracing Directory C:\Users\Ben\Do cuments\IISExpr ess\TraceLogFil es\
Thanks Ben, Please have a look on this solution http://stackoverflow.com/a/377 84901/1390850
Thanks Sandeep; Changing the port # on GR.Web solved the problem.
Glad to see your problem solved. Thanks for the feedback!