Part-I – The design blue print Part-II – The implementation
Category: .Net
How to improve your LINQ query performance by 5 X times?
Refer: http://www.codeproject.com/Articles/38174/How-to-improve-your-LINQ-query-performance-by-5-X
Read & Write Object Data from an XML File (C# and Visual Basic)
public class Book { public String title; } public void ReadXML() { System.Xml.Serialization.XmlSerializer reader = new System.Xml.Serialization.XmlSerializer(typeof(Book)); System.IO.StreamReader file = new System.IO.StreamReader( @”c:\temp\SerializationOverview.xml”); Book overview = new Book(); overview… Read more “Read & Write Object Data from an XML File (C# and Visual Basic)”
log4net RollingFileAppender configuration
The RollingFileAppender builds on the FileAppender and has the same options as that appender. The following example shows how to configure the RollingFileAppender to write to the file log.txt. The file written to will… Read more “log4net RollingFileAppender configuration”
Random meaning word with Linq
An example with LinQ string RandomWord(int length) { string libWord = @”Basic concepts History Formal language theory Formal definition Expressive power and compactness Deciding equivalence of regular expressions Syntax”; string original = libWord.Replace(System.Environment.NewLine,… Read more “Random meaning word with Linq”
String Format for DateTime [C#]
This example shows how to format DateTime using String.Format method. All formatting can be done also using DateTime.ToString method. Custom DateTime Formatting There are following custom format specifiers y (year), M (month), d (day), h (hour 12), H (hour 24), m (minute), s (second), f (second fraction), F (second fraction, trailing… Read more “String Format for DateTime [C#]”
Linq to SQL DataContext Lifetime Management
Get some good information there: http://www.west-wind.com/weblog/posts/2008/Feb/05/Linq-to-SQL-DataContext-Lifetime-Management
How to update a detached entity in Entity Framework
If you are using Entity Framework and closing or disposing of your DataContexts (read database connections) as soon as your Linq to Entities query have finished, which… Read more “How to update a detached entity in Entity Framework”