.NET Blog

Free. Cross-platform. Open source. A developer platform for building all your apps.

Featured posts

Join the .NET & C# Teams at Microsoft Build 2025
Apr 15, 2025
Post comments count 0
Post likes count 2

Join the .NET & C# Teams at Microsoft Build 2025

.NET Team
.NET Team

The countdown to Microsoft Build 2025 is on! Join us May 19-22 either in-person in Seattle or online and explore an exciting lineup of .NET and C# content, incl...

.NETASP.NETASP.NET Core

Latest posts

Translating OData queries to HQL
Feb 25, 2013
Post comments count 0
Post likes count 0

Translating OData queries to HQL

raghuramn
raghuramn

AspNet Web API OData makes it really simple to expose your IQueryable backend to be queried using the OData query syntax. Check out some samples here. If you are building using Entity Framework as your ORM (object-relational mapping) to talk to your database or just store all your data in-memory(Linq2Objects), you are in a good shape as you have an existing IQueryable. If you are talking to your own custom data source, you might not be lucky enough to have a LINQ provider or have a provider that has an incomplete implementation. If you are in this mess and are about to undertake the herculean task of implementing...

MVC Single Page Application Template for ASP.NET and Web Tools 2012.2
Feb 21, 2013
Post comments count 0
Post likes count 0

MVC Single Page Application Template for ASP.NET and Web Tools 2012.2

Xinyang Qiu
Xinyang Qiu

With the final release of ASP.NET and Web Tools 2012.2, we refreshed single page application page on asp.net .  It talks about KnockoutJS Template and introduced 4 community created SPA templates that you can install as MVC templates. There are four improvements for the MVC SPA template RTM release over the RC release that worth a note. Antiforgery support for Web API calls The ValidateAntiForgeryToken filter only works on MVC calls. Web API doesn't have a default Antiforgery filter yet. We implemented attribute “ValidateHttpAntiForgeryToken” inside Filters\ValidateHttpAntiForgeryTokenAttribute.cs to supp...

Pre-release of ASP.NET Scaffolding with a Web Forms scaffold generator
Feb 20, 2013
Post comments count 0
Post likes count 0

Pre-release of ASP.NET Scaffolding with a Web Forms scaffold generator

Anton Babadjanov
Anton Babadjanov

Today we are sharing a pre-release build of a new code generation framework known as ASP.NET Scaffolding, as well as a scaffold generator (code generator) for Web Forms. The Web Forms scaffold generator can automatically build Create-Read-Update-Delete (CRUD) views based on a model. Introduction Many programming tasks involve writing standard “boilerplate” code. Templates can help avoid having to hand-write all of this code, but only to a degree because they are static. MVC3 introduced the concept of scaffolding - generating code dynamically based on existing artifacts in a project. We are now extending this co...

MVP Summit presentation on async
Feb 20, 2013
Post comments count 1
Post likes count 0

MVP Summit presentation on async

Stephen Toub - MSFT
Stephen Toub - MSFT

Lucian Wischik and I presented an "async clinic" at the MVP Summit in Bellevue this week.  The async/await keywords in C# and Visual Basic drastically simplify asynchronous programming, but that of course doesn't mean that using them is without any gotchas: the goal of the discussion was to highlight some of the key areas in which we see developers struggling with asynchronous development and to help provide guidance on avoiding and overcoming those roadblocks.  Attached are the slides from the presentation. MVPSummit2013_AsyncClinic_Wischik_Toub.pptx

A Message Flow in ASP.NET Web API OData
Feb 19, 2013
Post comments count 0
Post likes count 0

A Message Flow in ASP.NET Web API OData

Hongmei Ge
Hongmei Ge

One of the biggest benefits that you have with ASP.NET Web API is that it gives 100% transparency of the source code because it is open source. You can easily enlist in the code repository and add the symbol path based on instructions at the CodePlex site, then off you go, you can debug the Web API code as if you were the original code author. Now if you are like me, who like to put a few breakpoints in the source code before hitting F5, you will need to understand the OData stack a little better. If everything goes expected, you might not need those breakpoints. But if anything goes wrong, such as getting a 500...

.NET Framework Documentation Improvements
Feb 19, 2013
Post comments count 0
Post likes count 0

.NET Framework Documentation Improvements

Brandon Bray
Brandon Bray

The CLR documentation team has been busy responding to feedback and making updates and changes to the .NET Framework documentation in the MSDN Library. We would like to tell you about the most recent set of document updates, which were published earlier in February. Performance content We have received extensive customer feedback regarding the importance of performance in .NET Framework apps, and we wanted to make it easier for you to find relevant content. As a result, we’ve reworked the existing performance and reliability topic to include more performance guidance as well as links to performance analysis t...

Getting a MIME type from a file extension in ASP.NET 4.5
Feb 14, 2013
Post comments count 0
Post likes count 0

Getting a MIME type from a file extension in ASP.NET 4.5

Jim Wang (WEB)
Jim Wang (WEB)

If you've ever implemented a file upload or download scenario in ASP.NET, you've likely come across the situation of having to provide a MIME type based off of a file extension. IIS does this automatically when it serves files, but it seems like in ASP.NET there isn't a good way to provide this functionality. Searches on the web might point you to building your own Dictionary of MIME types or just writing a switch statement, but this felt like a hack to me and so I turned to a resident expert, Levi Broderick.It turns out in ASP.NET 4.5 we shipped a little-known new type, System.Web.MimeMapping, which has an API c...

Workflow Changes for CodePlex Issues
Feb 11, 2013
Post comments count 0
Post likes count 0

Workflow Changes for CodePlex Issues

Howard Dierking
Howard Dierking

A couple weeks ago, some of you noticed that the core team closed a few issues on http://nuget.codeplex.com that were in the “Soonish” release. The items that were closed were feature suggestions that, while not bad ideas, were things that the core team decided weren’t going to make the cut for the next few releases. The pushback from the community in response was understandable. After all, if NuGet is an OSS project, why would the core team close good ideas simply because we weren’t going to act on them? Firstly, we’ve reopened the items that we had closed and moved them to the “Product Backlog” release (more on...

Protect your Queryable API with the validation feature in ASP.NET Web API OData
Feb 6, 2013
Post comments count 0
Post likes count 0

Protect your Queryable API with the validation feature in ASP.NET Web API OData

Hongmei Ge
Hongmei Ge

In the previous blog post, you can see how easy it is to enable OData query syntax for a particular action using Web API OData. Simply add a Queryable attribute to your action as follows, and you are done. It not only works for those actions using OData format, but also applies to any vanilla web api actions using other formats such as JSON.NET. It greatly reduces the need to write a lot of actions to perform operations like top, skip, orderby as well as filter. It is so powerful that it is almost hard to imagine building a real Web API application without it. Now everything works beautifull...