Monday, December 10, 2012

Date range query in Entity framework

Entity Framework Date rang query is not same as like LINQ.
You can try like this

 var events = this.coreDomainContext.Events.Where(  
   e => EntityFunctions.TruncateTime(e.EventDate.Value) >= DateTime.Today  
    && EntityFunctions.TruncateTime(e.EventDate.Value) <= EntityFunctions.TruncateTime(endPeriod))  
   .OrderByDescending(e => e.EventDate)  

For details you can See

C# print file on LAN Printer

If you want to print any file on network printer then you can try with this code block // Change Default Printer System.Ma...