Anyone who has worked with Entity Framework will have had to manage with loading related entities. I believe many developers will agree the way that system works is difficult to reconcile with design patterns such as the Repository pattern. In this post, I’ll provide one quick and easy way to automatically load all related properties from the database.
Update 2018-11-26: Added the equivalent for EF Core.
Between September 2016 and February 2018, I traveled through the Americas as a digital nomad. I usually try to avoid using this term because one may get the wrong idea of what it means when watching certain YouTube videos or Instagram pictures. Or just simply google it. Chilling out in a hammock on the beach on a sunny day with your laptop on your lap drinking your $10 margarita while getting a foot massage really doesn’t work and does not represent the lifestyle.
There are many ways in which you can improve your efficiency and effectiveness as a software engineer. I will provide you a list of tools that will help you to become more productive.
For the last few days I’ve been getting an error when comparing database schemas in Visual Studio using the SQL Server Data Tools:
“Unexpected exception caught during population of source model: Object reference not set to an instance of an object”
NimbleText is a useful tool that has been in my toolset for many years now. On the website, NimbleText is described as a “text manipulation and code generation tool (…) that magnifies your ability to perform incredible feats of text and data wrangling”. I agree with this statement and I don’t think it’s an exaggeration. And best of all, it’s free! There is a premium edition which unlocks all features and costs around $20. There is also a fiddle-like version available.
In this post I will show you a number of ways in which you can create and publish NuGet packages to your own feeds. But the focus will be on a new Visual Studio extension that I have written during my assignment for Dime, who were gracious enough to share this utility with the rest of the world.
Over the last few weeks, I made a few blog posts containing useful links for Microsoft’s certification exam 70-487: Developing Microsoft Azure and Web Services. I’m pleased to announce that I passed the exam with a score of 873. And because this is the third exam in the MCSD Web Applications track, I am now also a certified Microsoft Certified Solutions Developer.
Months behind schedule, I have begun preparations for my next exam: 70-487 Developing Microsoft Azure and Web Services. If I pass this one, I’ll be MCSD in Web Applications.
I have had to generate a lot of new files lately, and because I am allergic to repetitive work, I looked for a way to dynamically generate and process files. And for my case, PowerShell scripting comes pretty close to what I needed. Just like a few of my other posts (the best of StackOverflow and Things I always have to Google, I decided it would be a good idea to centralize these scripts and share them with you. Most of these scripts were made for one specific case so they’re not generic – but upon request I’ll try to make these as generic as possible. This is going to be a post that I’ll hope to update on regular occasions, so make sure to pay a visit every now and then if you’re working with PowerShell too.
There are few developers who haven’t used log4net, it’s just one of those essential utilities that every self respecting professional should know of. In this post, I’ll talk about customizing the logging process with custom properties.
Just as in my other post about topics I have to “re-Google” often, this post serves as a catalog of interesting Stack Overflow articles. Because the concept of browser favorites doesn’t work quite well in my world, this blog post does the job of keeping a simple and convenient list very well. To keep things as simple as possible, I have divided the post in categories, comparable to the tags in Stack Overflow.
In addition to this article, I have embedded this feature into a new PagingToolbar child class. Basically it adds a combo box to the toolbar’s items and then adds extra behavior so the store reloads with the specified page size.
It can be made even more generic and probably cleaner but this is an acceptable solution to the problem. Comments or suggestions are always welcome!
Every now and then, I have to Google for something that I’ve Googled before numerous times because I forgot. Because this is a time consuming activity, I’ll bundle them all into one post. In other words, this is a post that will be often updated.
In this blog post we’ll take a look at NServiceBus, a popular open-source service for .NET. With an easy to follow tutorial, you’ll have a working service bus up and running within minutes.
For the last couple of weeks I have been working with client-side frameworks such as Kendo UI and Sencha ExtJS a lot. One of the requirements of my clients was server-side filtering, grouping and ordering of several grids and other components. The challenge here is that you don’t know exactly what information might be coming in: which field do you have to filter or sort, which direction, what operator do you have to use, etc. There is only one proper way to do this in C#: Expressions.
For those eager to share their extraordinary bike rides (or other activities) from Strava, there’s an easy way to use Web API which I will explain in this post.
Recently I was asked what the difference was between **readonly **and **const **in C#, and I couldn’t really tell the exact difference. There are several good articles about this, like this StackOverflow article. In this article, I’ll stick to the very basics.
With the release of Visual Studio 2015 last week, I thought it would be a good time to inspect the new features that come with the newest version of C#. Although C# 6.0 is certainly not a major release from a developer’s perspective, there are some items that every developer will use in the coming years. In this post, I’ll show some examples on how to use these new features.
Today I passed the 70-483 Programming in C# exam. As any other Microsoft exam, the passing score is 700 on a total score of 1000. I scored way above my expectations, so I’m very happy that my efforts are rewarded with a MCP certificate. I can highly recommended experienced consultants and developers to take this exam. For beginning programmers ( < 1 year) this exam will probably be too difficult as there are many topics in scope of the exam. In order to motivate anyone who wants to take this exam, here is how I experienced the exam.
I see some pieces of the same error-prone code recur far too often in SharePoint. Probably most pervasive is the one to allow and not allow unsafe updates. In this post, I’ll provide a proper solution for this matter.
There’s one specific error that keeps coming back when I create new SharePoint solutions that require multiple assemblies next to the farm/sandboxed solution.
Every once in a while you’ll have a situation in which you temporarily have to use different (shared) settings and reset them if all work is done. An example of this is often seen in SharePoint, for instance disabling events when updating items in event receivers, or allowing unsafe updates. A workaround that I have seen a lot is that developers add a TRY/CATCH/FINAL block for each method they want to reset some objects. In this post, I’ll talk about an alternative way of achieving this behavior by the implementation if the IDisposable interface.