Missed .NET Day on Agentic Modernization? Watch the coding demos and agentic workflow sessions on demand.
.NET Blog
Free. Cross-platform. Open source. A developer platform for building all your apps.
Latest posts
OData Scaffolding
With the release of Visual Studio 2013 RTM, we added support for scaffolding OData controllers with Entity Framework. In this blog topic we will cover the following topics • Scaffolding an OData controller with Entity Framework on a Web API 2 project. • Extra configuration steps required to setup OData scaffolding in a MVC project. Scaffolding an OData controller with Entity Framework on a Web API2 project Create a Web project using ASP.NET Web Application template and select Web API. Create the following model classes in the Models folders of the project...
VS hung on installing or updating packages may be related to ReSharper8.1 EAP
Recently there have been customer reports of hangs in Visual Studio while installing or updating NuGet packages. It could be related to this issue, if you have ReSharper 8.1 EAP installed. The solution is to update ReSharper to one of the stable versions such as ReSharper 8.1. If it doesn’t solve the issue for you, please report it to us through http://nuget.codeplex.com.
A High-Value, Undocumented LESS Editor Feature in Visual Studio
Recently a very valuable, undocumented feature in the Visual Studio LESS editor came to my attention. This applies equally to Visual Studio 2012 Update 2 and later, and to Visual Studio 2013. The installation of Web Essentials is not required to benefit from this feature.The Visual Studio LESS Editor respects @import statements, and can resolve namespace, mixin and variable definitions from imported files. However, a common pattern with larger LESS projects is to have one include file establishing the include order, and a large number of source files with no @imports at all. The BootStrap project, for example, co...
Introducing batch support in Web API and Web API OData
With the release of Microsoft ASP.NET Web API 2 OData, we have introduced support for batching requests. Batching is a web API feature that allows a customer to pack several API requests and send them to the web API service in one HTTP request and receive a single HTTP response with the response to all their requests. This way, the client can optimize calls to the server and improve the scalability of its service. For a more in depth look at the batch support, you can take a look at the specification. Batch in Web API In order to start using batch in Web API, the only requirement is to register a route w...
Tutorial series updated for Entity Framework 6 Code First with MVC 5
We have updated our EF Code First / MVC tutorial series to use Visual Studio 2013, Entity Framework 6, and MVC 5. New Entity Framework 6 features covered in these tutorials include: The series includes the following tutorials: The old EF 5 / MVC 4 series is still available at a new URL: The old series covers some topics that have not been included in the new series yet. We plan to add these to the new series later: If there are other topics you’d like us to cover in these tutorials that we haven&rsq...
Tips When Making Changes in Entity Framework Code First Models after Scaffolding
When you scaffold an existing Entity Framework model, using MVC5 scaffolding in Visual Studio 2013, you can easily run into the issue of “The model backing the <DbContextName> context has changed since the database was created” as shown below. For example, in an MVC project, add the following model. Scaffold the Product model using “MVC 5 Controller with views, using Entity Framework” scaffolder in Visual Studio 2013. View the generated pages, Index/Edit/Details/Create, to verify things are working properly. Now, suppose we need to modify the Product model to add more fields, like Description ...
New Tutorial Published on Migrating to ASP.NET Identity
ASP.NET Identity is the new membership system for building ASP.NET applications. The new tutorial explains how to migrate an application that uses ASP.NET Membership to the new ASP.NET Identity system. The tutorial shows how to enable existing users to log in with the new Identity system by migrating the database tables that store user credentials, roles and profile information. The tutorial shows how to migrate from SQL Membership, but the concepts can also be used to migrate from Universal Providers or Simple Membership Providers. Once the migration is completed, you can use...
Web publishing updates for app offline and usechecksum
In Visual Studio 2013 we have added a couple of small features for web publishing that I’d like to share with you. Those updates are; how to take your app offline during publishing and how you can update the default file compare option. App offline support In Visual Studio when you publish your web application we do not force the remote app to be stopped/restarted. Based on your publishing artifacts your site may end up being restarted (for example you change web.config) but Visual Studio never had a way to take your application offline during a publish operation. There are a lot of reasons why you may want to...
Sending a CORS Request in IE
From the time we added CORS support for ASP.NET WEB API, we have seen many questions on its usage, including questions about sending cross-origin requests (CORS) from IE. IE 10 and higher fully support using XMLHttpRequest to send cross-origin requests. CORS for XHR in IE10 is a great blog post on this approach.CORS is also supported in IE 8/9, however, in a different way. Instead of XMLHttpRequest, an XDocumentRequest object is used to send cross-origin requests. Here’s another good reading about it: http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitati...