jumpinjackie / roslyn-ef-linq-analyzer

A Roslyn Analyzer to check common gotchas with LINQ expressions when used with Entity Framework
MIT License
14 stars 3 forks source link

No longer maintained

This analyzer could not progress beyond the "toy/demoware" stage, so the repository has been archived so signify that I am no longer maintaining/developing it. Do whatever you want with this code (within the bounds of the MIT license)

roslyn-ef-linq-analyzer

A Roslyn Analyzer to check for common gotchas with LINQ expressions when used with Entity Framework

Introduction

Entity Framework, while being a solid data access framework is laden with many gotchas that make your application prone to:

While profiling tools can help with the former, nothing much can help with the latter besides knowledge, experience and discipline ... until now.

This Roslyn analyzer will hopefully assist with the latter, detecting and flagging errors and warnings on such invalid usages before you ever start the application.

Build Requirements

Analyzer Checks

Analyzer Assumptions

See the (modified) Contoso University sample application code for the types of assumptions that the analyzer is operating under.

In particular, check out the "Minefield" controller for examples of syntatically valid EF code that will throw NotSupportedExceptions at runtime when invoked.

TODO

Lots of things :) But a rough list:

License

MIT