IQueryable<T> is a tricky interface. Some people argue that it is actually a bad abstraction, because it is impossible to implement it. This post is not about trying to prove or disprove this point. People who say this do have a point, but I do think they
One of the courses I teach is the standard Microsoft 70-483 exam preparation course. For some reason, the exam still has questions about how the BinaryFormatter and SoapFormatter components work (I'm not even going to try to guess why), so the training material also discusses the related concepts in detail.
As a teacher, I'm constantly faced with a frustrating challenge: eliminating boilerplate code from demos. If students have to type a lot of boilerplate code before starting a demo together or an exercise, valuable time is lost and they don't get the same knowledge — and since this is a service
Not long ago I was teaching a Programming in C# exam prep course. One of the modules involved serialization and a student asked me a question that was quite intriguing: Given the serialized form of an object, is it possible to deserialize it into an object if we only have
If you are only interested in downloading the packages, go to the marketplace. But if you want to know how it was made, read on ;) Back in the day we used WCF when it came to distributed software. Of course, the times have a-changed since and now in the pink
Dependency injection is probably the best thing in software development since slide bread. I often blog about related things and I also have a Visual Studio extension to help those who apply the principles in practice. Guard clauses in constructors An important piece of best-practice is that whenever you use
In my last post and the one before that I was writing about the process of releasing a new version of my LinqPad CosmosDb DataContext Driver. Those were the two important steps to make before the actual update of the driver — and now, it's finally here. If you just want
In my latest post I described my first steps to update my LinqPad Cosmos Db driver The whole idea was to show how the "backend" of my new and updated driver can be used as a standalone component. This makes updating and maintaining the component much better and
A while back I created a CosmosDb data context driver for LinqPad. Originally, I found the request on uservoice and I thought I'd give it a try. The end result was pretty OK, I guess. People started using it; I mean, this is not the "next big thing"
A while back (actually, it's been a long while) I found an interesting question on Stackoverflow. The question was about adding logging to method calls automatically. Or to rephrase: the question was basically about handling aspect-oriented programming using Mono.Cecil in .NET. So given this piece of code: public class
I've found an old HDD of mine and I got curious: what's on it? I had an old 3,5" HDD to USB adapter lying around and to my surprise, it was still working :) So I put the HDD in it, connected it to my 21st century notebook (actually,
Occasionally I do stuff that's just for fun and has little industrial significance (it's sad how often those two factors seem to correlate...). One of my hobbies involves diving deep into the .NET framework and creating fun projects. One of these projects were IL-Boss, whose remnants can still be found
Using Entity Framework Code First, you have the option of specifying indices on columns that are translated to migrations and from that you can generate the SQL script or update the database. With EF 6.2 you can use the new HasIndex() method to define your indices. Before 6.2,
Dependency injection is awesome. And Autofac is probably the best DI-container out there. It's like magic :) I really like to fiddle around with special registration concepts, like here, here or here. Or down below :) Keyed service registration and resolving Autofac has a great set of features called implicit relationship types.
What happens if you run this little piece of code? More specifically, what's the type of the variable 'x'? byte b1=1; byte b2=1; var x=b1+b2; Console.WriteLine(x.GetType()); Well, if you guessed byte, you were wrong. This will actually result in an int. This was