DSP2017

Moq.EntityFramework.Helpers NuGet package

As you probably know I wrote two articles about mocking DbSet<TEntity> with Moq: synchronous calls – Mocking DbContext and DbSet with Moq asynchronous calls – EntityFramework – asynchronous queries unit tests I combined those solution to one library and published in on NuGet – Moq.EntityFramework.Helpers. […]

By |2017-03-07T22:07:45+02:007 March 2017 |C#, Extras / Tools, Projects, Testing|2 Comments

EntityFramework – asynchronous queries unit tests

Sometime ago I described how we can use Moq to unit tests elements of DbContext – please check post Mocking DbContext and DbSet with Moq. Unfortunate that post didn’t covered all issues related to that topic. I didn’t write about unit tests asynchronous queries. Today I want to come back to this issue. We can treat a previous post as a starting point. We already have some code that help us to mock DbSet<T>. And right now we will extend that code to support asynchronous queries. It is very easy. We need only to implement IDbAsyncQueryProvider interface: public class InMemoryAsyncQueryProvider<TEntity> : IDbAsyncQueryProvider { private readonly IQueryProvider innerQueryProvider; [...]

By |2017-03-05T09:04:23+02:005 March 2017 |.net|0 Comments

Get Noticed! – Short introduction

A few days ago second edition Get Noticed! has started. From the beginning I wanted to be part of this competition community. The idea is great! Unfortunate as usual taking decision was not so easy. The main blocker was my calendar. In that time all of my weekends are busy. Moreover I am planning two foreign trips. One of them will be longer. Finally I decided to take part in it – a small motivation factor was that I tried to convince Jurka to take part in this competition. Finally I decided to take part in it. It seems that it will [...]

By |2017-03-04T15:02:53+02:004 March 2017 |Projects|0 Comments