Create MVC in Visual Studio using Material Design - asp.net-mvc-5

I want to create one project in Visual studio which use material design for its default User Interface. What are the steps that I have to follow to make this project.
What I have done is:
Created project
i. using asp.net web application
ii. using asp.net 4.5.2 MVC template
Installed MaterialSkin using Nuget Package Manager.
Now what I want is I want next other steps from here to completely install Material design.
I have my solution explorer image:

Related

automatically generate API controllers in Visual Studio

I have an existing SQL Server database that I want to use in a ASP.NET Core 3.0 web API project using Visual Studio 2019.
I'm following this tutorial to help me figure out how to do this:
Create a web API with ASP.NET Core
I don't need any views, because I'm going to have a separate ReactJS project for my front-end views that the user will interact with in a browser. I just want to use this API so that the ReactJS part can connect to it when it needs to
I have the solution created, but I'm not sure how to get Visual Studio to automatically generate the controllers from the database for what the tutorial calls CRUD.
I installed the Microsoft.EntityFrameworkCore.SqlServer package using the Nuget Package Manager in Visual Studio.
Is there a special command I need to run or do I need to install a library?
Thanks!

Should I use empty website or spa web application template for an Angular 2 project in Visual Studio?

For an angular project every tutorial on web, indicates to use Visual Studio Code. I am familiar with visual studio environment for like ten years besides there will be more project in my solution. Visual studio code is fine for an angular project but what about other projects in my solution? like services or class libraries.
So i decided to use visual studio 2017 rather than visual studio code. But i couldnt decide which template to choose for angular project, a website or spa template? And is there a way to run an angular project on nodejs just clicking run button.
I would really recommend using the Angular CLI if possible. The CLI adds tooling for testing and AOT among other things that will save you a lot of time in the future.
here is an article about using the CLI with Visual Studio in an MVC app it may give you more info on specifics that you have.
http://candordeveloper.com/2017/04/12/how-to-use-angular-cli-with-visual-studio-2017/
There are some excellent custom templates available for Visual Studio. I personally use this one for Visual Studio 2015. However, I am sure it would work for Visual Studio 2017.
https://marketplace.visualstudio.com/items?itemName=Drag13.Angular2WebTemplate
You can try out the new templates available via "dotnet new" such as "dotnet new angular" You can find out more here: https://dotnetcore.gaprogman.com/2017/04/20/dotnet-new-angular-single-page-application-setup-and-how-the-template-works/

How do I add a reference to my Model(s) to a unit test project for MVC 5 in Visual Studio 2015?

Background: learning about MVC, Bootstrap, etc. So, new to doing this in Visual Studio. More of a C# backend programmer / hand-rolled html/css/js fiddler.
I'm trying to add a unit test to an MVC project, and I get the uselessly generic "A reference to 'Your Project Name' could not be added." error when I try to reference my main project so I can test against my Model classes.
Visual Studio 2015 Professional
Created new Project with File -> New Project -> Templates -> Visual C# -> Web -> ASP.NET Web Application
Selected "Web Application" from ASP.NET 5 Preview Templates
Added some code, including a class to serve as a model for Code First.
Added a Unit Test project under the Solution folder by right-clicking and choosing Add -> New Project, under the Visual C# folder for the templates I picked Test -> Unit Test Project. The targeted framework at the top was set to .NET Framework 4.5.2
Googling around suggested that I had a target framework mismatch. I don't know how to check the target framework on a MVC project I guess, the Project Properties window lists Application and Solution DNX SDK version ( set to 1.0.0-beta5, platform .NET Framework ) but doesn't tell me what framework I'm targeting.
How I can utilize Microsoft's unit testing framework with this kind of project?
In Visual Studio, open the Package Manager Console (TOOLS > Nuget Package Manager > Package Manager Console) and type the following command:
Update-Package
This will update and 'level' all packages of both projects and any version mismatch should be fixed.

Importing one project (or some of it's classes) into another project in Visual Studio 2012

I added a new project in my VS solution already containing 3 projects. However, I couldn't import this project into the the files of existing project with the help of "using" keyword.
PS: The newly added project is a MVC web application and the older projects are C# projects to develop windows form application. My ultimate goal is to pass data from my MVC web application to the classes of existing projects.
I figured it out. I had to reference the projects.
Right Click -> add reference. Hope this helps to some having same issue.

MVC5 project template for Visual Studio 2012

I'd like to get started with ASP.NET MVC 5 using Visual Studio 2012. I've installed the "ASP.NET And Web Tools 2013 for Visual Studio 2012, but this "only" gives me an "Empty ASP.NET MVC 5 Project" template.
For MVC4 web projects, I can select different kinds of Web applications (like "Standard", "Internet", "Intranet" etc.). And I've seen screenshots with similar options for Visual Studio 2013.
Are there any project templates (for VS2012) which allow me to do the same for MVC5 applications?
It seems that "currently" there is only included the Empty Project template, and MS officially hasn't released all other templates for VS2012. For ASP.NET MVC 5 you can use the scafolding to add the Controllers, Views etc. This is the same for WebAPI templates.
ASP.NET MVC 5 template
We added a new MVC 5 template. It references
the latest MVC 5 NuGet packages, and you can use scaffolding to add
controllers and views.
Also see the RELEASE NOTES
Not sure if you are interested in this answer, but I have a tutorial that will not only get your empty MVC 5 project working with Bundling, a controller, jQuery, jQuery UI, Modernizr and more, but it will walk you through installing Zurb's Foundation 5, a responsive Framework which I have working with Sass in MVC 5. It's all here:
http://httpjunkie.com/2013/158/install-zurbs-foundation-5-in-net-mvc-5/
The problem many have ran into is that Visual Studio 2012 only allows you to start from a blank MVC 5 project, so I will help you get the NuGet installed which is pretty similar to the instructions in the NuGet package with a few minor changes; however, it does not take into consideration that you will be installing from Visual Studio 2012 using a Blank MVC 5 project. If you would like to use Foundation 5 with MVC 4 Web Application template just omit the Bootstrap uninstall and the NuGet package should work fine, but if you need to use MVC 5 and you don’t have Visual Studio 2013, you will need to build the Home Controller, Bundling class, modify the Global.asax.cs as well as other quirky little things. So lets get started.
I spent a good part of a few hours getting it all working.
I just ran across this and going through it now. It seems to be spot on as well as really answering the posters question.
http://httpjunkie.com/2013/340/develop-mvc-5-with-asp-net-identity-in-visual-studio-2012/
Use VS2013 express, which has the latest templates, generate the scaffolded project (not empty), then go back to VS2012 and do your work.

Resources