有哪些提供商以及您使用它们的经验
我想知道所有可能的本机.NET Framework实体框架提供程序以及它们与默认LINQ2Entities(MS for MS SQL)相比的局限性.如果对同一个数据库有更多的更好.告诉我,我将使用此列表更新此帖子.
您可以直接在此帖子中添加其他提供商或提供答案,其他人(包括我)会将其添加到列表中.
Microsoft SQL Server Standard/Enterprise/Express
Microsoft SQL Server CE(精简版)
MySQL的
MySQL Connector(从6.0版本开始) - 我在使用时已经阅读了有关问题Skip(),Take()并且Sort()在同一个表达式树中 - 每个人都欢迎输入他们的相关经验/知识.
注意:Visual Studio的Express Edition不支持MySQL Connector/NET Visual Studio集成,这意味着您将无法在Database explorer窗口中查看MySQL数据库或通过Visual Studio向导对话框添加MySQL数据源.一些用户可能会发现这限制了他们在Visual Studio Express中使用Entity Framework和MySQL的能力.
Devart dotConnect for MySQL - 与我读过的MySql连接器类似的问题,并且都试图责怪MS [这些问题应该被解决 ]
SQLite的
PostgreSQL的
神谕
对于我的生活,我无法让SqlProfileProvider在我正在进行的MVC项目中工作.
我意识到的第一个有趣的事情是Visual Studio不会自动为您生成ProfileCommon代理类.这不是什么大问题,因为扩展ProfileBase类只是简单的事情.在创建了ProfileCommon类之后,我编写了以下用于创建用户配置文件的Action方法.
[AcceptVerbs("POST")]
public ActionResult CreateProfile(string company, string phone, string fax, string city, string state, string zip)
{
MembershipUser user = Membership.GetUser();
ProfileCommon profile = ProfileCommon.Create(user.UserName, user.IsApproved) as ProfileCommon;
profile.Company = company;
profile.Phone = phone;
profile.Fax = fax;
profile.City = city;
profile.State = state;
profile.Zip = zip;
profile.Save();
return RedirectToAction("Index", "Account");
}Run Code Online (Sandbox Code Playgroud)
我遇到的问题是对ProfileCommon.Create()的调用无法转换为类型ProfileCommon,因此我无法取回我的配置文件对象,这显然导致下一行失败,因为配置文件为空.
以下是我的web.config的片段:
<profile defaultProvider="AspNetSqlProfileProvider" automaticSaveEnabled="false" enabled="true">
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ApplicationServices" applicationName="/" />
</providers>
<properties>
<add name="FirstName" type="string" />
<add name="LastName" type="string" …Run Code Online (Sandbox Code Playgroud) 我有一个以.vbs结尾的文本文件,我在下面写了:
Set Conn = CreateObject("ADODB.Connection")
Conn.Provider = "Microsoft.ACE.OLEDB.12.0"
Conn.Properties("Data Source") = "C:\dummy.accdb"
Conn.Properties("Jet OLEDB:Database Password") = "pass"
Conn.Open
Conn.Close
Set Conn = Nothing
Run Code Online (Sandbox Code Playgroud)
无法找到提供商.它可能没有正确安装.
但它已安装.我认为问题的根源是提供者是32位提供者,据我所知它不存在为64位.
如果我在64位计算机上通过IIS运行VBScript(作为ASP文件),我可以选择它应该以32位模式运行.然后它可以找到提供者.
如何在Windows 64位上找到提供程序?我可以告诉CScript(执行.vbs文本文件)以某种方式在32位模式下运行吗?
我想在整个应用程序中共享一些变量,如基本路径.在模块配置期间,需要可以访问这些变量.我的意见是,我可以使用常量或提供者.
我有几个模块,每个模块都有自己的路由配置.在这些路由配置中,我想访问一些设置,例如.
这适用于app-module-configuration但不适用于其他模块配置(对于其他模块上的控制器),我总是得到"未知提供者:来自myApp.orders的信息".
var myApp = angular.module('myApp', ['myApp.orders']);
myApp.constant('info', {
version : '1.0'
});
myApp.config(function(info) {
console.log('app config: ' + info.version);
});
myApp.controller('MyController', function (info) {
console.log('controller: ' + info.version);
});
var orders = angular.module('myApp.orders', []);
// Remove comments to see it fail.
//orders.config(function(info) {
// console.log('orders config: ' + info.version);
//});Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app="myApp" class="container" ng-controller="MyController">
</div>Run Code Online (Sandbox Code Playgroud)
我想我错过了一些细节,你有什么想法吗?
javascript provider dependency-injection constants angularjs
文档中指出这些是相同的,context.read只是Provider.of<x>(context, listen: false). 如果我尝试context.read在构建方法中使用,控制台中也会出现错误,但它没有解释原因。
我还发现了这个话题:Is Provider.of(context, listen: false) 等价于 context.read()? 但它没有回答“为什么”。
我对这个框架很陌生,并且使用我遇到的提供程序包进行状态管理ChangeNotifierProvider和ChangeNotifierProvider.value,但我无法区分它们的用例。
我曾用ChangeNotifierProvider代替ChangeNotifierProvider.value,但它没有按预期工作。
我无法将多个消费者用于具有提供程序的单个小部件?假设我的小部件是 CurvedNavigationBar 并且我在该小部件中有 4 个项目。我还有 4 个不同的类,它们扩展了 ChangeNotifier 并负责 CurvedNavigationBar 中的每个项目。
如何在单个小部件中收听这 4 个更改通知程序?我查看了文档并找不到这样的示例..这甚至可能吗?我发现 Consumer 有一个 builder 方法,所以这意味着你只能构建一个小部件一次/并听一次它。
我是否应该拥有一个扩展 ChangeNotifier 的类,然后更新该小部件中的值并仅使用一个 Consumer 来侦听更新的值?
我刚从Angular2 RC1升级到RC4.
在我用之前:
provide(LocationStrategy, {useClass: HashLocationStrategy})
Run Code Online (Sandbox Code Playgroud)
但是,在升级到RC4之后,提供显示为已弃用.
我没有找到任何关于此的文件.
有没有人知道发生了什么?
我想为我的Web应用程序使用Java Persistence API(JPA).
有流行的JPA实现,如Hibernate,Toplink和EclipseLink.什么实施是一个很好的选择,为什么?
它的作用非常简单:
@Inject
private Provider<ProductService> productService;
Run Code Online (Sandbox Code Playgroud)
Product服务可通过productService.get()并.get()在每次调用时从Spring上下文中解析实例.
但什么时候应该使用它?在哪里?
我的主要用例非常简单:当我获得循环依赖时,提供程序有助于在运行时解决依赖关系.但是当你无法创建由循环依赖引起的上下文时,它会看起来有点随机.
是否有关于提供商使用的已知模式?
provider ×10
flutter ×3
java ×2
.net ×1
32-bit ×1
64-bit ×1
adodb ×1
angular ×1
angularjs ×1
asp.net-mvc ×1
constants ×1
dart ×1
database ×1
deprecated ×1
frameworks ×1
javascript ×1
jpa ×1
orm ×1
persistence ×1
profile ×1
spring ×1
vbscript ×1