Development With A Dot
Blog on development in general, and specifically on .NET. Created and maintained by Ricardo Peres.
-
.NET O/RM Performance Comparison
With the launch of the ORMBattle.NET site, a new discussion started on the blogosphere; later on, this post by Gergely Orosz added more ashes to the fire. The subject seems to be, is it possible to blindly compare O/RM tools, disregarding all differences between them, in simple yet not plausible scenarios, such as loading/saving/updating N entities in a loop?
-
NHibernate LINQ 1.0 Released
After the recent release of NHibernate 2.1.0 (a nice one!), the next best news is the release of LINQ to NHibernate!
-
NHibernate 2.1.0 Released
Great news!
-
Microsoft Anti-XSS 3.0 Library Released
Get it from here.
-
NHibernate Relations - One to One
This is my first post on NHibernate relations. I will first talk about a somewhat misused relation, one to one.
-
NHibernate in Action Book
-
NHibernate and Manually Assigned Identifiers
Be careful when you use manually assigned identifiers on your entities, because NHibernate looks at them to determine if an object is new or is already in the database.
-
NHibernate Mappings
In this post, I will talk about NHibernate mappings. Let's start from the data model:
-
Sharing Resources between a Web and a Windows Forms Application
It is possible to share a common set of resource files between a web and a windows forms application quite easily. You first create the resource files on the web application as global resource files, and place them on the App_GlobalResources folder. On the windows application, add a link to these files, that is, do not copy them. Make sure you mark them as embedded resources. Here comes the tricky part: you can see from the generated classes that these classes are trying to load from the App_GlobalResources folder, what you have to do is, through reflection, change the resource manager to point to the current assembly and resource location. Let's see how this is done: FieldInfo fi = typeof(MyResourceClass).GetField("resourceMan", BindingFlags.Static | BindingFlags.NonPublic); fi.SetValue(null, new ResourceManager("My.Full.Default.Assembly.Namespace.MyResourceClass", Assembly.GetExecutingAssembly()); In this example, suppose your windows forms assembly has a default namespace of My.Full.Default.Assembly.Namespace. And that's it! You can now do: String myVariable = MyResourceClass.MyResource on both projects.
-
FormsAuthentication and Session Timeouts
Because the FormsAuthentication and the Session cookies are not the same, it is possible that when you are accessing your application you are still logged in, but the session has expired. In this situation, perhaps the best thing to do is logout from FormsAuthentication and redirect to the same page. You can do this through a custom module. Let's see how: