enterprise-library

How to call stored procedure in MVC by EF

主宰稳场 提交于 2019-11-28 06:04:02
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. 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 entities and linq-to-entities (main EF features), don't you? Generally you need: EDMX file (ado.net entity

How do I create a hierarchy of lognames in the Windows event system?

孤街醉人 提交于 2019-11-28 05:01:23
I am logging messages using Enterprise Library. I want some of these (typically errors and warnings) to be passed to the Windows event-system). I today route these via entlib.config. This solution works and so far, so good. But, I have more needs than what this solution provides me. I have multiple installations that should log to different logs, but I want their names to be logical and intuitive in the event-viewer. But, the Windows event-system cannot have two categories where the first 8 characters in the name are the same. The category-name can be longer, but only the first 8 letters is

Performance of system.runtime.caching

☆樱花仙子☆ 提交于 2019-11-28 04:58:12
I have compared the performance of system.runtime.caching in .NET 4.0 and the Enterprise Library Caching Block and to my surprise it performs terribly in comparison when fetching large data collections from cache items. Enterprise Library fetches 100 objects in about 0,15ms, 10000 objects in about 0,25ms. This is fast, and natural for an in-process cache because no data actually needs to be copied (only references). The .NET 4.0 caching fetches 100 objects in about 25ms, 10000 objects in about 1500ms! This is terribly slow in comparison and it makes me suspect the caching is done out-of

How to resolve “Could not find schema information for the element/attribute <xxx>”?

南笙酒味 提交于 2019-11-28 04:05:22
In visual studio, I have an asp.net 3.5 project that is using MS Enterprise Library 4.0 application blocks. When I have my web config file open, my Error list fills up with 99 messages with things like Could not find schema information for the element 'dataConfiguration'. Could not find schema information for the attribute 'defaultDatabase'. Could not find schema information for the element 'loggingConfiguration'. Could not find schema information for the attribute 'tracingEnabled'. Could not find schema information for the attribute 'defaultCategory'. If I close the Web.config file they go

When should I use Tracing vs Logger.NET, Enterprise Library, log4net or Ukadc.Diagnostics?

微笑、不失礼 提交于 2019-11-28 02:49:13
How do I choose between standard tracing, Logger.NET, Enterprise Library, log4net or Ukadc.Diagnostics? Is there a situation where one is more appropriate than the other? ... what would that be? (ASP.NET, console app, Azure Cloud, SOHO, Enterprise...) What are the benefits or drawbacks? Did I miss any other major logging frameworks? wageoghe There are many similar questions here on SO: Logging best practices log4net versus TraceSource Silverlight Logging framework and/or best practices log4net vs. Nlog What's the point of a logging facade? C# Logging. What should I use? You missed several

How to effectively log asynchronously?

被刻印的时光 ゝ 提交于 2019-11-28 02:44:11
I am using Enterprise Library 4 on one of my projects for logging (and other purposes). I've noticed that there is some cost to the logging that I am doing that I can mitigate by doing the logging on a separate thread. The way I am doing this now is that I create a LogEntry object and then I call BeginInvoke on a delegate that calls Logger.Write. new Action<LogEntry>(Logger.Write).BeginInvoke(le, null, null); What I'd really like to do is add the log message to a queue and then have a single thread pulling LogEntry instances off the queue and performing the log operation. The benefit of this

Activation error occured while trying to get instance of type Database, key “” <— blank

和自甴很熟 提交于 2019-11-28 00:06:41
问题 I'm trying out the Enterprise Library 5.0 and was doing some unit-tests on my BL, do I need to have a app.config on the DL or on the Test project? note: I already have the configuration settings on my web.config on my web project. how I use the DAAB: private static Database db = DatabaseFactory.CreateDatabase(); db.ExecuteNonQuery("spInsertSalesman", salesman.Fullname); my app.config on DL: <configuration> <configSections> <section name="dataConfiguration" type="Microsoft.Practices

Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Common' or one of its dependencies

元气小坏坏 提交于 2019-11-27 23:37:45
问题 I have searched google for this and could not find the solution to the problem. My Website references DAL (custom dll) which references Enterprise Library Data Access Components. I have added the Enterprise Library from the NuGet Package Manager and when I try to build the Website this compilation error pops up: Error 44 Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Common' or one of its dependencies. The located assembly's manifest definition does not match the

Does Enterprise Library 6 work with Visual Studio 2013 and/or 2015?

邮差的信 提交于 2019-11-27 20:13:00
It seems it does not and we are planning to use it (Logging, Exception, etc..) for future projects. Is it still supported? I do not see a lot of activity around this tool as there used to be. We already have NewRelic so also be helpful to know if NewRelic can do logging/Exception handling already. For example, can I create custom logs or exceptions and see them in the new relic dashboard? It does. You may add Enterprise Library 6 into your project via Nuget Here is the sample application. using System; using System.Diagnostics; using Microsoft.Practices.EnterpriseLibrary.Logging; using

Implementing Log file using Enterprise Library in asp.net

这一生的挚爱 提交于 2019-11-27 16:59:53
问题 I m using Microsoft Enterprise Library 3.1 for Exception Handling in asp.net, the erors are stored in Event Viewer of the system . Instead of Event Viewer I need to store these errors in a log File using Enterprise Library. 回答1: Dear 2:30, You paste the following code inside configuration section at app.config or web.config file <configSections> <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices