是否有使用 Fluent API 的 C# EF6 DbContext 生成器? [英] Is there an EF6 DbContext Generator for C# which uses Fluent API?

查看:16
本文介绍了是否有使用 Fluent API 的 C# EF6 DbContext 生成器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道适用于 Visual Studio 2012 的 EF6 VS 工具附带一个 T4 模板来生成与 EF6 一起使用的 DbContext 类.

I know that the EF6 VS Tools for Visual Studio 2012 come with a T4 template to generate DbContext classes which work with EF6.

但我想要一个使用流畅 API 的生成器.我与 EF4EF5 不适用于 EF6,作者不再使用它们来制作它们EF6 兼容.

But I want to have a generator which uses fluent API. The older version I used with EF4 and EF5 don't work with EF6 and the author no longer works on them to make them EF6 compatible.

是否有其他人正在开发使用与 EF6 配合使用的 Fluent API 的生成器?

Is anyone else working on a generator which uses Fluent API which works with EF6?

推荐答案

http://visualstudiogallery.msdn.microsoft.com/72a60b14-1581-4b9b-89f2-846072eff19d

如果你有一个数据库,你可以先使用反向代码,它会生成你所有的流利的 api 映射.

If you have a database you can use reverse code first it will generate all your fluent api mapping.

这篇关于是否有使用 Fluent API 的 C# EF6 DbContext 生成器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆