.NET 4.0 and VS 2010 introduce a new feature for the Entity Framework called model first. In addition, you will now be able to have a code only model. Written with POCOs and a simple class derived from ObjectContext and you are on the way…
http://blogs.msdn.com/efdesign/archive/2009/06/10/code-only.aspx
Programming, Tips and Tricks .NET, .NET 4.0, C#, Entity Framework, Visual Studio 2010
Yesterday i was attempting to use a stored procedure with the Entity Framework through the “function import” features and couldn’t get the auto-gen feature to expose the function on the Context. The stored procedure was returning a scalar value which at this point doesn’t seem to be supported through auto-gen. Choosing an Entity, however works fine. Further digging this morning led me to this article on the ADO.NET team blog explaining the issues with return types and stored procedures in Entity Framework. The article also links to another great article showing how to return custom types two ways: one way through the entity framework itself, the other through the use of extension methods.
ADO.NET Entity Framework Extensions
Programming .NET, C#, Entity Framework
T4 code generation has been on my short list of things to look into but keeps getting put off as i navigate down some other endless path. Meanwhile, I found a nice article on using T4 to generate stored procs for CRUD operations for the Entity Framework.
Entity Framework Stored Procedure Generation
Thanks David.
Programming, Tips and Tricks .NET, Code Generation, T4
Ran into an issue on a website where the Session was timing out yet the forms auth ticket was still valid which was causing errors. Here is one solution:
http://dotnethitman.spaces.live.com/blog/cns!E149A8B1E1C25B14!210.entry
The GU also mentions some of this in the post and in digging through all the comments.
http://weblogs.asp.net/scottgu/archive/2005/11/08/430011.aspx
Programming, Tips and Tricks .NET, C#
Recently i’ve been researching the default providers in .NET for Membership, Roles and Profiles and came across this code which provides a custom implementation of the above with simple db structures behind them. http://altairiswebsecurity.codeplex.com/
Tips and Tricks .NET, .NET Custom Providers, ASP.NET
Ran into an issue using a jQuery.UI.Dialog control on an asp.net web form today. When defining a dialog jQuery.UI takes the dialog and appends it right before the closing </body> tag. This is outside of the <form> tag causing any values you wanted from the form to be empty in your code-behind.
Here is the fix that worked for me:
$('#dialog').parent().appendTo('/html/body/form[0]');
This works great and the dialog now displays as expected, capturing the results in the code behind except for I originally wanted the dialog wrapped in a UpdatePanel. In order to fix this issue, I created an empty div and appended the dialog content there:
$('#dialog').parent().appendTo('#dialog_target');
Not the results i expected. When the content refreshes the dialog is messed up. The answer was to move the content panel inside of the dialog with the user control doing all the work!!!
<div id="dialog" class="ui-widget-content ui-corner-all" title="Add New Client"></div>
Programming, codeproject ASP.NET, codeproject, jQuery, jQuery.UI
Today I was investigating options in robocopy to move files from one folder to the next while preserving directory timestamps (/DCOPY:T) and came across something that may come in handy for those of you that tend to run out of space on primary hard drive. It only requires your vista installation CD and no other tools.
http://geekswithblogs.net/lorint/archive/2006/12/07/100596.aspx
Tips and Tricks robocopy, Vista
This is one of my favorite plug-ins for Visual Studio. In my opinion it works better than the Alpha drop down at the top of the window. For those of you that organize your source code this tool will be perfect.
http://www.codeplex.com/SourceCodeOutliner
Programming C#, Visual Studio 2008