C#, Geen categorie

Exam 70-487 Preparation, Part II: Entity Framework

Note: this blog is no longer maintained. Please go here to see the latest updates of this post.

This is the second part in the Exam 70-487 preparation materials series. This post will cover all objectives regarding Entity Framework.  If you want to see all of this in action, check out the Github repository.

Continue reading

Advertisements
C#, Entity Framework

How to automatically load navigation properties in Entity Framework

Note: this blog is no longer maintained. Please go here to see the latest updates of this post.

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.

Continue reading

C#, Cloud, Entity Framework, MVC

Creating SQL schemas using Entity Framework Code First

Note: this blog is no longer maintained. Please go here to see the latest updates of this post.

As you might have read in my previous post, I used SQL schemas to partition data between tenants. Being part of the true definition of SaaS, a new tenant should be up and running within minutes without any human intervention.

With my suggested approach, we need to do two things:

  • Registering a new tenant
  • Attaching users to the tenant

In this article, I am going to focus on the first item whereas the second one shouldn’t be a big deal if you are planning to create software as a service.

Continue reading