Archives for the 'C#' Category
The .NET 4 Task Parallel Library is great because you can specify continuations for new threads:
private Task<WebResponse> GetWebResponseAsync(string url)
var webRequest = WebRequest.Create(url);
The stored procedure must have an out sys_refcursor parameter as the first argument.
Tested with NHibernate 2.1.2 and Oracle 11g.
Needs Oracle.DataAccess (not System.Data.OracleClient). Tested with Oracle.DataAccess 22.214.171.124 AMD64.
<hibernate-mapping xmlns=”urn:nhibernate-mapping-2.2″ assembly=”SampleProject” namespace=”SampleProject”>
In 2009 I blogged about how Snippet Compiler allows us to test out C# code without having to create a project in Visual Studio just for that. Now there’s something better: LINQPad. Don’t be misled by its name; it’s not just for LINQ, it can run any C#, VB, or even SQL code. I particularly […]
How do deferred execution and lazy loading work in LINQ to Entities (Entity Framework)? Let’s find out!
First, some sample data. We don’t want to make it too simple, so let’s have three entities:
Employee, who belongs to a Department
Department, which is under a Functional Group
Functional Group 01
Functional Group 02
Here’s my best attempt to explain C# value types and reference types, and “pass by value” and “pass by reference” to a newbie. (Not you, of course.)
A piece of paper, on which is written the number 5. You use this number to calculate something.
A piece of paper, on which is written a memory […]