.NET 4.0
MVC 3 AdditionalMetadata Attribute with ViewBag to Render Dynamic UI
A few months ago I blogged about using Model metadata to render a dynamic UI in MVC 2. The scenario in the post was that we might have a view model where the questions are conditionally displayed and therefore a dynamic UI is needed. To recap the previous post, the solution was to use a custom attribute called [QuestionId] in conjunction with an “ApplicableQuestions” collection to identify whether each question should be displayed. This allowed me to have a view model that looked like this: 1: [UIHint("ScalarQuestion")] ......
Posted On Sunday, January 30, 2011 11:44 PM | Comments (3)
WCF REST Services Inside MVC Projects
Recently I blogged about WCF REST services with no svc file and no config. In this post I also discussed the pros/cons of WCF services as compared to using MVC controller actions for web services and I made the case that, in many instances, WCF REST services is better than using the MVC infrastructure because WCF provides: a more RESTful API with less work a convenient automatic help page to assist consumers of your service automatic format selection (i.e., xml/json) depending on HTTP headers In ......
Posted On Wednesday, September 22, 2010 10:55 PM | Comments (7)
C# 4 Named Parameters for Overload Resolution
C# 4 is getting a new feature called named parameters. Although this is a stand-alone feature, it is often used in conjunction with optional parameters. Last week when I was giving a presentation on C# 4, I got a question on a scenario regarding overload resolution that I had not considered before which yielded interesting results. Before I describe the scenario, a little background first. Named parameters is a well documented feature that works like this: suppose you have a method defined like this: ......
Posted On Tuesday, March 16, 2010 12:14 AM | Comments (3)
.NET 4.0 and Visual Studio 2010 Presentation at Microsoft
On February 4th, I will be presenting .NET 4.0 and Visual Studio 2010 at the Microsoft office in Reston as part of my company’s continued efforts to provide education on Microsoft technologies. This presentation will cover a wide breadth of technologies that are being launched by Microsoft this year. The presentation is geared towards technical decision makers including Architects, CTO, CIO, Project Managers, IT Managers, and senior development resources. This a totally free Microsoft sponsored event ......
Posted On Friday, January 22, 2010 1:08 PM | Comments (0)
Comparing Entity Framework 4 New Stored Procedure Support to LINQ to SQL
The next version of Entity Framework has many new features, many of which are enabling it to catch up with features previously available in other frameworks like LINQ to SQL. One of these new features is the updated stored procedure support. In previous versions of EF, working with stored procedures was quite limited and really only usable with CRUD operations that were mapped to already defined entities. With EF 4, you can start with your stored procedure and have the designer automatically generate ......
Posted On Wednesday, December 16, 2009 11:24 PM | Comments (8)
Attaching Modified Entities in EF 4
Lately I’ve been working with EF 4.0 and finding that many of the new features are catching up with the features previously available in other framework like LINQ to SQL. One example of this is the ability to easily attach objects (for example, disconnected objects that come in from another tier). For example, imagine you had a web service where a consumer submitted an object to get saved – you’d want to instantiate a new context, attach the incoming entity, and save the object. In previous versions ......
Posted On Friday, November 27, 2009 10:12 PM | Comments (11)

View Steve Michelotti's profile on LinkedIn

profile for Steve Michelotti at Stack Overflow, Q&A for professional and enthusiast programmers

Google My Blog

Tag Cloud