Tag: 提供程序

使用Angular JS向其他模块configuration注入常量

我想在整个应用程序中共享一些variables,如基本path。 这些variables需要在模块configuration期间进行访问。 我的意见是,我可以使用一个常数或提供者。 我有几个模块,每个模块都有自己的路由configuration。 在这些路由configuration中,我想访问一些设置,例如。 这适用于应用程序模块configuration,但不适用于其他模块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); //}); […]

各种数据库的entity framework提供者列表

那里有哪些供应商和您使用它们的经验 我想知道所有可能的原生.NET框架entity framework提供者,以及它们的缺陷,以及与默认的LINQ2Entities (来自MS for MS SQL)相比的局限性。 如果有更多的相同的数据库更好。 告诉我,我将用这个列表更新这个post。 随意添加额外的提供者直接到这个职位或提供一个答案和其他人(包括我)将其添加到列表中。 entity framework1 Microsoft SQL Server Standard / Enterprise / Express Linq 2实体 – Microsoft SQL Server连接器 DataDirect ADO.NET数据提供程序 Microsoft SQL Server CE(精简版) 任何供应商? MySQL的 MySQL连接器 (从版本6.0开始) – 我已经阅读了在同一个expression式树中使用Skip() , Take()和Sort()的问题 – 每个人都欢迎input他们的经验/知识。 注意 :Visual Studio Express Edition中不支持MySQL Connector / .NET Visual Studio集成,这意味着您将无法在数据库浏览器窗口中查看MySQL数据库,也无法通过Visual Studio向导对话框添加MySQL数据源。 有些用户可能会发现这限制了他们在Visual Studio […]

如何在64位机器上以32位模式运行VBScript?

我有一个文本文件,以.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 当我在Windows 32位机器上执行它时,它运行并结束,没有任何概念(预期)。 当我在Windows 64位机器上执行此操作时,会出现错误 供应商无法find。 它可能没有正确安装。 但它被安装。 我认为问题的根源在于提供者是一个32位的提供者,据我所知它并不是以64位的forms存在的。 如果我通过IIS在64位机器上运行VBScript(作为ASP文件),我可以select它应该以32位模式运行。 它可以find提供者。 我怎样才能find在Windows 64位提供商? 我可以告诉CScript(它执行.vbs文本文件)以某种方式运行在32位模式?

在ASP.NET MVC中实现configuration文件提供程序

对于我来说,我无法让SqlProfileProvider在我正在处理的MVC项目中工作。 我意识到的第一个有趣的事情是Visual Studio不会自动为您生成ProfileCommon代理类。 这不是什么大问题,因为扩展ProfileBase类很简单。 创build一个ProfileCommon类后,我编写了下面的Action方法来创build用户configuration文件。 [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"); } […]