Questions tagged [entity-functions]
10 questions
34
votes
3 answers
Can't get EntityFunctions.TruncateTime() to work
I am using Entity Framework Code First. Using LINQ to Entity I want to grab a record based on a DateTime value. Here is my current code:
///
/// A method to check and see if the Parsed Game already exists on the
/// database. If Yes, then…

J86
- 14,345
- 47
- 130
- 228
5
votes
3 answers
EntityFunctions.CreateDateTime issue with leap Year in linq to entity
When i have a leap year in my database (ex.: 29th Feb 2012). The EntityFunctions.CreateDateTime functions throws System.Data.SqlClient.SqlException: Conversion failed when converting date and/or time from character string.
My Code is as follows in…

Prasad
- 58,881
- 64
- 151
- 199
4
votes
0 answers
Durable Entities in Durable Functions $return binding returned a non-None value - Python
I am trying to use Durable Functions in Python and I want to store the state in a Durable Entity. There is very little documentation on how to work with Durable Entities, especially in Python. I have even tried to read some C# code, but it hasn't…

Emac
- 1,098
- 3
- 18
- 37
3
votes
1 answer
Azure Durable entity functions to get & set timestamp info using timer trigger
I am trying to store the time stamp information in durable entities and retrieve it every time a trigger fired. Here is how I am doing it. I want the timestamp value set by the current execution to be available for the next trigger. But when the…

Kiran Kumar
- 31
- 1
2
votes
0 answers
Returning oracle ref cursor using Entity Framework
I'm trying to receive the result from an Oracle stored procedure that has a record list of office information using Entity Framework, and for the life of me I can't get this working. I'm using EF6 with the Functions add-on. I've tested the stored…

MikeL
- 79
- 2
- 12
1
vote
3 answers
How to work around Entity Framework date time type bug?
I want to get the all the monthly expired products, here is the query for that:
_customerProductsRepository
.Where(
d =>
!d.ReleaseDate.HasValue &&
EntityFunctions.AddMonths(d.RenewalDate ?? d.AcquireDate, 1) < now)
…

Eran Betzalel
- 4,105
- 3
- 38
- 66
0
votes
1 answer
Cancel scheduled operation for azure function durable entities
Is it possible to cancel a scheduled operation in azure function durable entity ? Below is an example code.I want to cancel the call to operation "DeviceTimeout"after it is scheduled.
Entity.Current.SignalEntity(Entity.Current.EntityId,…

Nirbhay Jha
- 491
- 5
- 13
0
votes
1 answer
Subtract two dates with 'let' variable then average()?
Attempting to subtract two dates from one another to figure out the number of days, then execute .Average() on the 'let' variable avgConversion.
I encounter the following error; LINQ to Entities does not recognize the method 'System.TimeSpan…

JReam
- 898
- 2
- 13
- 28
0
votes
2 answers
how to add hours and minutes using canonical functions in linq
My linq query now,
return _db.Details
.FirstOrDefault(c => c.Master.Id.Value == nId &&
c.Id == c.Master.Id &&
c.Alert.Va <= c.Va &&
…

Duk
- 905
- 5
- 15
- 34
0
votes
2 answers
linq to entities - how to query dates that are stored as char?
In the db table the dates are stored in a char(8) field in this format yyyyMMdd.
How do I query for a date range?
I tried the following and it does not work:
context.Where(p=> Convert.ToDateTime(p.Date) >=…

dm80
- 1,228
- 5
- 20
- 38