I am writing a log parser for an ASP.NET mvc2 web application. I use the unit structure as a model and logging using the SqlServer2008 CDC facility using my manual engine.
While inserting or editing a row in the database, the action is being taken, however, there is a small gap between changes in the actual table and entering those changes. I need to display the details from the CDC tables, when the user clicks on some of them. Due to the stated interval, I can not compare the equivalence of two date time values. I want to allow the interval of 2000 milliseconds. The easiest way I know is that the use of ticks or timeoffs is reduced and the full value of their values has been reduced, but the cursed Linq-to-Entities does not allow these two properties.
This is a simple function in which I have problems ...
public static list & lt; Dbo_Object_CT & gt; GetLogDetails (Int32 objectID, DateTime? Action date and time) {ObjectEntities oe = New ObjectEntities (); Join Var mylogdetails = (ltm in oe.lsn_time_mapping object log object log in oe.dbo_Object_CT. ___ equals start_lsn ltm.start_lsn where (objectLog.Id null == objectID) & amp; ((Akshndet and Time == True: (Math Abuse (Action Date and Time Value - Taxes - ltm.tran_begin_time.Value.Ticks) 2000) Select the object lodge.toolist (); returned mylogdetails;} I know I can manually create the "where" clause, but it is a great opportunity to do a big, ugly and slow?
a look and see
You can find some information about EntityFunctions Class .
Comments
Post a Comment