The previous post contained lots of information about how dependency injection works with database providers. This post adds more to the provider story by explaining how to implement a method like UseSqlServer that allows applications to select the provider to use.
A previous post gave an overview of how dependency injection is used internally by EF Core, and how applications might interact with this. In this post we will look at some of the internal details. This post is aimed at provider writers and people who may want to contribute to the EF source code. Application developers should not need to know any of this.
There has recently been some confusion about what mappings are supported for collection navigation properties in EF Core. This post is an attempt to clear things up by showing:
- What types of collection are supported
- When the backing field can be used directly
EF Core can interact with dependency injection (D.I.) in two ways:
- A D.I. container can be used to create DbContext instances
- EF uses a D.I. container internally for its own services
The first of these was covered in a previous post. This post covers how EF uses dependency injection internally and how it can interact with an external container.
This post describes the different ways to create and configure instances of DbContext in EF Core 1.1. This includes:
- Calling a constructor directly and overriding OnConfiguring
- Passing DbContextOptions to the constructor
- Using Dependency Injection (D.I.) to create instances
In this post I’ll outline the basic building blocks needed for an EF7 provider. The idea is not to show how everything should be implemented, but rather to show what pieces are needed and how they fit together. The best examples of EF7 providers are the SQL Server and SQLite providers, which ca both be found in the EF repro on GitHub.
EF7 providers should be shipped as NuGet packages. This post does not cover NuGet packaging, but you can look at the GitHib repro for some ideas on how to do this.
I found this video a week or so ago showing how to create 360° spherical photos that can be viewed in the Samsung/Oculus Gear VR. It works nicely, but it is both tedious and error-prone trying to manually capture all the images needed for a full spherical picture. I figured it would be much more convenient if something could automatically move the camera appropriately. Enter the Lego Mindstorms 360° Photobot for Gear VR!