Using Stored Procedures in the Entity Framework with Scalar Return Values
Although stored procedures may be on their way out (see post here: http://stackoverflow.com/questions/216569/are-the-days-of-the-stored-procedure-numbered), they are still supported in Entity Framework and can be used relatively easily. There are many tutorials on how to use a stored procedure in the Entity Framework to return a set of data and bind it to an Entity. But I had a little more trouble figuring out how to call a stored procedure that returns a scalar value.
Tutorial for Configuring Silverlight 4, Entity Framework and WCF RIA Services in Separate Component Assemblies (DLL’s)
Why does Microsoft assume that we want to combine our business, data access, service, and web layers together in a single web project? Without sounding too much like a rant here, take a look at almost ALL of Brad Abrams (former Microsoft Architect for WCF RIA Services and Entity Framework) posted examples of how to use the Entity Framework with RIA Services. They all have the Entities, RIA Services, and pretty much all of the other data logic included in the Web Application project.
Dynamically retrieving the executing assembly version attribute - C#
In our C# project the version attribute is defined in a CS file as:
assembly: AssemblyVersion("3.6.2.5")]
To dynamically retrieve that via code, use the command:
Override Default SPAN Tag for Composite Controls
When creating a composite control in ASP.NET, by default, the main container tag that holds all of your controls and HTML is output as a SPAN tag. One of the issues with this default behaviour is that SPAN elements (at least according to the standard) are "inline" elements. As opposed to something like "DIV" elements which are "block" level elements, SPAN tags are inline and should only contain other inline elements. So if you are adding any block level elements to your composite control, in order to be aligned with standar
Add Icon for Custom Control / Composite Control
When a custom control is placed on the toolbox, if it is a professionally made control, it usually has a really nice icon associated with it instead of the default ("paper-looking") icon that Visual Studio inserts when no icon is available. When you build your own custom control, you can add an icon for the control and embed it in your component's DLL assembly so that it is shown on the toolbox whenever someone adds your control.
Popular Articles
Last viewed:
- Performance benchmarks for LINQ vs. SqlDataReader, DataSet - Selects: Part 1
- C# Free Component to Generate PDF - Convert HTML to PDF
- SQL Create Table Add Description to Column
- Fixing Relative Paths in C# ASP.NET When Using Url Rewriting
- Silverlight Memory Leak DataGrid, DataForm, DataTemplate, etc...
- Fix for Firefox click() event issue


Recent comments
1 day 1 hour ago
1 day 7 hours ago
1 week 1 day ago
1 week 1 day ago
1 week 2 days ago
1 week 5 days ago
2 weeks 1 day ago
2 weeks 1 day ago
2 weeks 1 day ago
2 weeks 1 day ago