enterprise-library

Substitute for Microsoft Data Access ApplicationBlocks obsolete SqlHelper class

空扰寡人 提交于 2020-01-03 18:18:33
问题 It looks that the old SqlHelper class from the Microsoft Enterprise Library has been mostly replaced by the Database class which is included in the new Enterprise Library version 5. I have a very simple and trivial example: using Microsoft.ApplicationBlocks.Data; private void PopulateCheckBoxGroup() { const string strConnTxt = "Server=(local);Database=DataBindTests;Integrated Security=True;"; const string strlSql = "select Technology from PreferredTechnology where ParentId = 1"; CheckBoxList1

await/async Microsoft Practices Enterprise Library Data

 ̄綄美尐妖づ 提交于 2020-01-02 02:46:07
问题 I have an older application that I wrote where I used Microsoft.Practices.EnterpriseLibrary.Data to get data from the DB. I have recently upgraded to .NET 4.5 and wanted to advantage of await/async . I do not see any methods ending in "Async" as per the naming standard, even in the most recent version of the package. Is it possible to use await/async with this ADO .NET library without manually making it asynchronous? 回答1: I'm using an older version of the EL that offers Begin* / End* methods,

Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

十年热恋 提交于 2020-01-01 05:36:34
问题 I have integrated my project with another one (MVC3 application). Then I'm getting below error. Both the projects are working fine with the Microsoft Enterprise Library version 5.2.414.0 . After integrating only some of the pages are working and remaining pages throwing below exception. Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file

Why do I get System.IO.FileLoadException: Could not load file or assembly, about once a week on my ASP.Net Website?

孤街醉人 提交于 2019-12-30 06:46:34
问题 I have a rather simple internal ASP.Net Website that has issues loading the Microsoft.Practices.EnterpriseLibrary.Data dll about once a week. Here is the Exception message: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied. File name: 'Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' at

Why do I get System.IO.FileLoadException: Could not load file or assembly, about once a week on my ASP.Net Website?

∥☆過路亽.° 提交于 2019-12-30 06:46:10
问题 I have a rather simple internal ASP.Net Website that has issues loading the Microsoft.Practices.EnterpriseLibrary.Data dll about once a week. Here is the Exception message: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied. File name: 'Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' at

How to call stored procedure in MVC by EF

五迷三道 提交于 2019-12-28 11:49:13
问题 Where can I get good tutorial on Entity framework with Stored Procedure in MVC framework? Is it better to use Enterprise library in this case when I have almost everything written in the stored procedure. Note: I am using stored procedure because they are really very complex and some of them is over 1000 lines. 回答1: MVC is in this case absolutely not related. The way how you call stored procedure from EF will be still the same. I guess you want to use stored procedures without actually using

How to obtain the database schema of a stored procedure

瘦欲@ 提交于 2019-12-25 07:59:40
问题 I have a T-SQL stored procedure in SQL Server, which queries multiple columns from multiple tables. For example, it may pull employee id from one table, employee name from another table, and employee department from another. In the database, each of those columns has a different length (e.g. employee id may be a varchar(20) , employee name may be a varchar(30) , and department may be a varchar(40) ). How do I get the schema of the stored procedure results in .NET? In other words, in .NET,

Fluent API takes effect only once (Enterprise Library)

房东的猫 提交于 2019-12-25 06:04:15
问题 I wish to do the below using the fluent api Modify the configuration at run time; perhaps to take into account external factors or changes to the environment. https://msdn.microsoft.com/en-us/library/ff664363(PandP.50).aspx But I get into issues. The problem is exactly same as the below link. Change Enterprise Library configuration midway in a program 回答1: This code works in Enterprise Library 6: class Program { static void Main(string[] args) { FirstConfig(); Logger.Write("Before processing"

Entlib5 string validation

假如想象 提交于 2019-12-24 16:53:25
问题 How can I validate some string if this is the rule: - can be empty - if not empty -> max length: 30 I know this two ways: [IgnoreNulls] [StringLengthValidator(30)] or [ValidatorComposition(CompositionType.Or)] [StringLengthValidator(30)] [NotNullValidator(Negated=true)] but is there a way NOT to use IgnoreNulls or Composition.Or (have problems: Entlib5 Validation [IgnoreNull] throws exception while adding objects to list) 回答1: I've solved this issue. I couldn't use Composition, NotNull or

Entity framework vs enterprise library [closed]

我只是一个虾纸丫 提交于 2019-12-24 11:36:43
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I am working on a asp.net project the client has given me access to a database remotely. The database has two users. One user has read only access where as other one has owner access. The client says that for