You're trying to access a web server running on port 58962 of your local machine, but there is on web server running there. We can't access your machine so we can't tell you why that is. Typically you only use non-standard ports when running the site in debug mode from Visual Studio. So either you are trying to access your site outside of VS, or VS's internal web server isn't working for some reason.
You need to look at the full details of the exception, including the InnerException, to see what the error is.
NB:SingleOrDefault will return null if there are no records. When you try to read the property on the next line, you could potentially get a NullReferenceException. It would be better to use Single in this instance.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Is anyone help me out for import tables data from PDF file and show them on front using C#,.Net ,please suggest me a piece of code for random column and row and also recommend library OR 3RD party such as RadDocumentProcessing,telerikdocument processing ,Itextsharp etc .
What layers required for make asp.net core 2 project for prevent repeat data ?
I need to make new project with asp.net core 2.1 using Generics and i have more questions
How many layers used ?
which layer must have initialize of connections ?
Anything related to data and database connection should be placed inside your Data Access layer. Anything related to Business rules and validation should be placed inside your Business Layer or whatever you want to call it.
Mocking in tests is to replace the access of external resources with other things like hard-coded values so that you can test the business logic in your app independent of other things. So the short answer is that you would probably mock the entire web EmployeeController so that any code that calls the webapi would call your mocked controller instead.
If it is the controller itself you want to test then you would mock out the data access, in this case your EmployeeDataAccessLayer, so you could call the methods on your controller from a unit test without needing database access. However your controller methods don't really do anything, there is no logic in them, they just act as an interface to calls on the data access layer. So long story short, there is nothing here worth testing.
xUnit unit testing framework has the ability to use external data sources for unit testing.
For example you could create a spreadsheet or a database table will a randomized set of data that can be used as the mocked source data for your unit testing.
I am trying to learn React.Js, I am trying to start with a small Hello World application, the problem is, I am not able to integrate React.Js with with MVC that I have or even MVVM, what I want is, I write some jsx file I want to execute it part of my MVC application. Just like I used to write code for my previous applications and just execute them when I press F5, am I doing anything wrong here? Can't I write jsx files as part of my MVC application and call them and execute them just by pressing F5?
Any guide for me for integrating my MVC or Web Api application with React.Js or Angular 2.0 anything is fine, I am getting very frustrated because there very less help for executing React or Angular as part of Visual Studio, I am searching a lot, but I couldn't execute even a single link successfully.
Need some help, if anything that can explain me those basic things to execute at least one application successfully - please.
I put some money in Udemy for react that guy is teaching more of Passport than react and ASP.Net MVC full stack - very sad.
Any help a link or a suggestion anything helps me, because even the errors are not descriptive they are not explaining me why something is failing - frustrated, please any help.
Have you created your project type as a Web Application type? Other types won't fire up the internal IIS Express server. This is moot if you're rolling with a stand-alone web server, but that doesn't sound like the case.
If you're using MVC, is your base jsx being served by your home controller? If not, that would be a problem, but I frankly wouldn't use MVC.NET for this, I would use WebAPI with a static files section.
I applaud your ambition on learning React or Angular, a path I took last year and started out integrating my learning with a MVC project which was quite a steep learning curve. Yes you can integrate ReactJs and Angular into a MVC project, and even a .Net Core project, but you have to change the way you think about programming and .Net.
Keep in mind that ReactJs and Angular doesn't require a .Net environment. .Net is just used as a back end to feed data to the client script pages. In hindsight, I found using .Net for the back end much harder to deal with than using say pure Java or Typescript for the whole thing.
I would like to seed your ambition with some files and code, but It's just too large to post here.
I actually build a large project that uses ReactJs both client and server side and works great.
Start with the client side first, then work your way to the server side.