I try to use in the umbraco functions to get data from DB. But not from the project that implement the umbraco, but from another project in a same solution.
Is there some nuget that can help me to add the the function of umbraco to the outer project?
And what's the function of umbraco that get data from the database?
Yes, you'll have to include UmbracoCms.Core with nuget
You can acces the database through contentservice and mediaservice
There's an example available on github that accesses Umbraco through a console application that might be helpful: https://github.com/sitereactor/umbraco-console-example/
Related
The project that visual studio 2019 creates for an ASP.NET Web Application (.NET Framework) MVC5 comes with Bootstrap 3.x and many other outdated components. Not to mention unneeded things like modernizr.
If you update Bootstrap, you know need to modify the ScriptBundle in BundleConfig to get the application to start, and then modify the CSS to get the premade web pages to render properly.
Also, the folder structure is not the best.
Is there a project template out there that has all essential components updated, and a clean-up NuGet and folder structure?
I tried using Rider but they do not have a built-in template.
I went t the .Net Foundation GitHub and did not find any: https://github.com/dotnet?q=.NET+framework&type=&language=c%23&sort=
I also search GitHubub and did not see any: https://github.com/search?q=ASP.NET+Web+Application+%28.NET+Framework%29+project+template
I am looking for a project template that has the basic structure to create a Clean Architecture in .NET Framework and not .NET Core
I know it's legacy, but unfortunately, I need it for a university class (University courses take a while to get updated, and in this case, they claim that there are sufficient companies out there using ASP.NET MVC 5 to Merrit them teaching it) But yes, No one should be using this to start a new project they intend to put into a real-life production scenario.
Thank you
I want to develop a Umbraco package. Where do I have to start and Where do I have to end?
I have knowledge on Asp.net MVC 4 and using the Umbraco cms as a user
A package is quite a broad definition. A package can for example be an extension to Umbracos back office, but can also simply consist of nodes.
There is plenty of guides and documentation on Umbracos website.
Read more here, for example https://our.umbraco.com/documentation/extending/
This should definitely be where you have to start. Where you have to end is hard to say, because it depends on the package you want to create.
How can an API controller be added to a project with existing MVC (non-API) controllers?
Problem:
I've created a very basic "hello world" MVC project with only one model, view, and controller. When I attempt to add the API controller (not using scaffolding), I can't get using System.Web.Http; to show in IntelliSense. using System.Web will show up, but the .Http part is not available. What do I need to do or change?
Details:
I'm using VS2013 Express on a Win7 machine.
David Tansey pointed in the right direction with his comments, but after researching there's more to this than I realized as a beginner.
First, this wasn't available in the using statement because I didn't have a reference for system.web.http in my project. Digging further, I found the reference wasn't even available! So, I had to install using NuGet Package Manager Console Powershell.
In powershell, I can't just do install-package System.Web.Http. That package doesn't exist. But, thanks to one answer that David Tansey's comments pointed to, I noticed I could do install-package microsoft.aspnet.webapi. Wonderful! Now System.Web.Http is listed under References in my project, and I can write the using statement in my API controller code: using System.Web.Http;
For a beginner like me, a lot of steps to go through, and a lot of material to comprehend, to get started.
I want to create a class library for an MVC 4 web application. Every search I've tried has returned plenty of references that merely mention creating one, or the importance of doing so, but not specifics of how.
My first assumption was a template would be under Web in the Visual Studio New Project dialog, but no. I was unsure if I was to use the Class Library template under Windows, but did.
I want to include things like some data access (e.g., DbContext), but while Intellisense sees the System.Data.Entity namespace, there are no classes available. I guess I need some additional references, but no idea which ones. Looking at the references in my main MVC project, at lot of them are pointing to the Packages folder. I'm unsure if I should be doing the same.
In short, I'm looking for instructions on how to create a class library for MVC in Visual Studio, including the necessary references for EF, Razor and whatever else.
you used the correct template - a simple class library is all you need.
then in the MVC web project just add a reference to the class library project
Use NuGet to add references to the pieces of functionality, like EF and System.Web.MVC, that you need in your class library or libraries.
A data access project to handle persistence and a class library to hold HTML Helpers that you might want to reuse both make some sense. Razor views if you're using the RazorEngine rendering stack can also be interesting to be able to test.
You are right to use the Class Library template in visual studio for your needs. You can add all of the references you need through NuGet (such as Razor, EF, and so on) and by Right clicking on references in the Solution Explorer and picking and choosing what you need.
Remember when using multiple projects that you add references between projects too! (for example your Web App project needs to know about your Data Repository Project)
So Microsoft has released a new update for the Web Tools.
Web Tools 2012.2 Scot Gu Blog
However the way it is designed, it will not update the current project, I would like to update a current project and am unsure on how to go about doing this. Any suggestions?
You can update all of the javascript libraries that are added by default in the new templates using NuGet. You can add in the new features, such as SignalR and Web API Tracing using NuGet too.
Basically, NuGet is your friend. :)