danielwertheim/SisoDb-Provider — Issue #8: Suggestion: How to make R# not complain about possible nulls
Author: mattiasw2
Created: 2011-12-31 14:57:21+00:00
State: open

Hi,

Been using R# since v1, yes I am old, and I cannot live without it. One small thing is that i warns about possible null references. Now, it warns that db in

```
ISisoDatabase db = new Sql2008DbFactory().CreateDatabase(cnInfo);
```

and unitOfWork in
```
unitOfWork.Insert(albumStats2);
```
might be null.

Or maybe, EnsureThat should be replaced by Microsoft Code Contracts. http://msdn.microsoft.com/en-us/devlabs/dd491992

I expect R# and other tools to learn these: http://blogs.jetbrains.com/dotnet/2010/11/resharper-nullreferenceexception-analysis-and-its-contracts/