Execution of 'System.DateTime:AddHours(Double)' on the database server side currently not implemented.
In the linq query:
var accounts = from a in Scope.Extent<Account>()
where a.LastTransaction < DateTime.Now.AddHours(-6) && !string.IsNullOrEmpty(a.Password)
select a;
return accounts;
11 Answers, 1 is accepted
We are aware of the problem, it is already on our TODO list. As per your request, we will raise the priority. Thank you for the vote.
Regards,
Alexander
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Vote for it :-)
Regards Markus
we got your request...
Meanwhile, you can just calculate the resulting value on the client side and use this value as a parameter (removing the calculation from the LINQ query):
var later = DateTime.Now.AddHours(-6);
var accounts = from a in Scope.Extent<Account>()
where a.LastTransaction < later && !string.IsNullOrEmpty(a.Password)
select a;
return accounts;
Best Regards,
Thomasthe Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
at the moment this is not pushed yet. We've implemented the Date property however, so we could do something like
from x in Persons where x.Birthday.Date >= new Date(x.Marriage.Year-18, x.Marriage.Month, x.Day) select x;
to find all Persons that married before they were 18.
I have filed an entry for such a feature.
Sincerely yours,Thomas
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
hmm, I would be willing to support DateTime.ToString() to invoke the default behavior in the server, but I'm not convinced yet that ToString("complicated fomat") should be pushable to the server. At the end, we need to consider database systems specifics here.
Regards,Thomas
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
so at the end is it more about supporting a way to express the DateTime.DayOfWeek property?
What else is required?
Thomas
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
I'm not really convinced that this is a fantastic idea: I'm from Germany and would write Dezember so no 'american english speaking' database server would give me the right answer in this case, as all would return some form of dec, Dec, December etc..
In this case, a DateTime.DayOfWeek == System.DayOfWeek.Tuesday seems preferrable to me.
Thomas
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.