How do I get intellisense in app.config for a custom section?

XML Intellisense will not automatically work for a custom configuration section. Visual Studio may report warnings on compilation complaining that the attributes of the custom configuration section are not defined. These warnings may be ignored. If you want XML IntelliSense support for a custom configuration section (or if you just want the ‘schema not found’ … Read more

How to write a .Net application that works with both SqlServer and Oracle (now that System.Data.OracleClient is deprecated)

EDIT: The fully managed ODP.NET is now available in production. It is very small (less than 10MB) and is not dependent on other files. You can obtain it here: http://www.oracle.com/technetwork/topics/dotnet/downloads/index.html Original answer: One way to easily ensure that the required Oracle client side software (including ODP.NET) is always available on the deployment machine is to … Read more

IoC Factory: Pros and contras for Interface versus Delegates

Any place where you need a run-time value to construct a particular dependency, Abstract Factory is the solution. I would argue against this. Dependencies should not be constructed using runtime data, as explained here. In summary the article states: Don’t inject runtime data into application components during construction; it causes ambiguity, complicates the composition root … Read more

Entity Framework – First query slow

We had the same issue in EF 5.0 and as of today a superficial Google search does not reveal a sufficient speed-up. According to this link http://msdn.microsoft.com/en-us/library/cc853327(v=vs.100).aspx “Loading Metadata” carries a moderate time cost but only needs to occur once per AppDomain. I have found no pre-compilation like tricks for loading the meta-data. The workaround … Read more

How can I step into a SQL Server stored proc from my C# code?

I’ll build on Davide’s answer and Ian’s comment to it because that was the exactly the process I have gone through. Assumption: answer is based on VS2008 & VS2010. To step through a T-SQL stored procedure on SQL Server while debugging a .NET app you need to do the following: Follow the MS Support instructions … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)