SQL Server Application Role

Sql Server Application Role is a way to control access to the database for specific applications. It simply grants a access to a program  that provides application role credentials, not for the user login that is used to connect to a database. Application Roles are useful when you want to restrict direct access to the database for a user or group of users, but you want the…

By Mirek on (tags: Application Role, Entity Framework, SQL Server, categories: architecture)

FileTable performance test

In my last post I have described a workaround for using a FileTable in Entity Framework 6.0. In this post I would like to show you the results of performance test of storing big documents in sql FileTable. I have put in comparison storing 10 pdf documents 16MB each in database. First application is a Entity Framework Code First based app with mapped stored procedures. Those pro…

By Mirek on (tags: Entity Framework, FILETABLE, SQL, categories: architecture)

Using SQL FileTable in Entity Framework

FileTable is a great new feature in SQL Server 2012 which facilitates storing and working with unstructured blob data in SQL Server. Unfortunately is not yet supported in Entity Framework, so you cannot simply use FileTable in your entity model. But there is a workaround for this inconvenience, which I am going to show you in this post. FileTable is a fixed schema regular sql t…

By Mirek on (tags: Entity Framework, FILESTREAM, FILETABLE, SQL, categories: architecture, infrastructure, code)

Entity Framework – lazy loading properties

In the Entity Framework we can easily enable lazy loading of navigation properties by marking them as virtual. This however applies only to properties that reference other related entity type. The framework does not support lazy loading of scalar or primitive properties. But there is a trick to fill this lack quite easily. Let’s assume we would like to lazy load some properties…

By Mirek on (tags: Entity Framework, lazy loading, shared primary key associations, table splitting, categories: architecture, code)

Where should I store settings of my application?

Where should I store user and application settings in my WPF application? Well, in Settings of course. Go to your WPF application properties and Settings tab. If there is nothing there but text in the middle, click on that text. This will create the Settings file in your project. Here you can add settings in the grid. The columns are: Name, Type, Scope and the Value. Name and t…

By Mirek on (tags: c#, settings, WPF, categories: architecture)

Plugins in WPF MvvM with MEF

In this post I will show you the way we can implement a plugin functionality in WPF MvvM application with use of Managed Extensibility Framework (MEF). MEF is a tool that may facilitates extending and decoupling your application. In some scenarios it is very similar to Dependency Injection, but is rather focused on one primary purpose: Import and Export of objects. What is good…

By Mirek on (tags: MEF, mvvm, Plugins, WPF, categories: architecture, code)

New blog!

I know it doesn’t look new, but trust me, it is. Most of the changes were done in the back end. We’re now using a totally different backend (custom made, like the previous one) – we’ll see how that works out. For the front-end changes – the side section got a little bit of long needed rework – hope you like it. Also – commenting does not require logging in any more. We’re using…

By on (tags: None, categories: architecture)

Task-based Asynchronous Pattern

Task-based Asynchronous Pattern with async and await keywords introduced in .net framework 4.5 starting point. First recommendation is downloading and reading 96 pages document about Task-based Asynchronous Pattern from Microsoft Download Center. Next go through the msdn lab: here and article  here. Have a nice reading…

By Mirek on (tags: async, TAP, categories: architecture)

Strange phenomenon after moving to Visual Studio 2012

Recently we moved our main WPF project to .net framework 4.5 and Visual Studio 2012. Then when I tried to preview some of basic views in Visual Studio designer I faced some strange problems. We have several user controls that we use in our views. The error we get was After deeper investigation we found another exception This was mysterious, because when running the application,…

By Mirek on (tags: .net 4.5, user control, Visual Studio 2012, WPF, categories: architecture)

Semantic Versioning

We’ve been using semantic versioning for a while now and it’s been paying out. Though there were some ‘quirks’. Now, version 2.0 is (almost) out and guess what, it addresses them! Let’s take a look at the new version and see what changed. I’m going to start with a little propaganda. Why you SHOULD use semantic versioning or at least some sort of reasonably (though that’s subjec…

By on (tags: versioning, categories: architecture)