Questions tagged [entity-sql]

Entity SQL is a storage-independent query language that is similar to SQL.

Entity SQL is a storage-independent query language that is similar to SQL. Entity SQL allows you to query entity data, either as objects or in a tabular form.

98 questions
0
votes
2 answers

Entity query 'Like' doesn't support int column

I am trying to implement the Like operator by using the entity framework query. But it seems Like doesn't appear to be supported on an int column. Here is my query: using (ObjectContext ctx = new…
user998405
  • 1,329
  • 5
  • 41
  • 84
0
votes
1 answer

ObjectQuery as a parameter in ESQL

Assume I have 2 entities: Ent and SubEnt with N:1 relationship. So, there are navigation properties SubEnt.Ents and Ent.SubEnt. Also, I have some ObjectQuery defined: ObjectQuery se; How can I create ESQL query that selects all entities…
Sergey40a
  • 3
  • 2
0
votes
2 answers

How to return a Bool from a Where Filter using Entity Framework and Esql

I use c# and ef4. I have a Model with an Entity with two proprieties int Id and string Title. I need to write an ESQL query that is able to return bool TRUE if Id and Title are present in the DataSource. Please note Id is a PrimaryKey in my data…
GibboK
  • 71,848
  • 143
  • 435
  • 658
0
votes
1 answer

Use OPTION (MAXRECURSION 0)

I have the following sql query that is run on a hierarchical data: WITH DirectReports(RootId, ManagerId, Id, RelativeEmployeeLevel) AS ( SELECT Id RootId, ManagerId, Id, 0 AS RelativeEmployeeLevel FROM tbl UNION ALL SELECT…
user989988
  • 3,006
  • 7
  • 44
  • 91
0
votes
1 answer

Translation of SQL query with INNER JOIN to Entity SQL query - C#

I build the following SQL query dynamically: StringBuilder query = new StringBuilder(); StringBuilder query2 = new StringBuilder(); if (ComboRuleType.Text.Equals("Standard")) { query.Append("select * from [dbo].[" + ComboRuleTableName.Text +…
Raza156
  • 47
  • 2
  • 12
0
votes
2 answers

Comparing dates in Entity SQL

What is the correct eSQL syntax to compare dates? The equivalent LINQ-to-Entities expression would look something like this: var lastYearsShipments = from p in MyDataServiceContext.Products where p.ShipDate.Value.Year ==…
Robert Claypool
  • 4,262
  • 9
  • 50
  • 61
0
votes
1 answer

difference between EF and Entity-SQL when working with .net core

I am beginner to .net core. And I am working on an enterprise application where there are multiple classes interfaces for multiple project inside a one solution. i know Entity Framework won't be a good idea if we are facing huge number of wrappers.…
0
votes
1 answer

Entity SQL concatenation

I have a select in Entity SQL that returns simple strings, and I should concatenate to a string. select (p.X + p.Y) from ExampleEntities.ExampleTable as p group by p.X, p.Y For example it returns 3 string and I should concatenate it to 1 string.
0
votes
1 answer

Can I use Entity SQL to query an IQueryable?

I know I can use ESQL to query an ObjectSet of T but can I use it to query an arbitrary IQueryable of T? EDIT Example: var originalQuery = from t in Transactions where t.Date < DateTime.Now select t; // query is now an IQueryable. Now I…
Andre Pena
  • 56,650
  • 48
  • 196
  • 243
0
votes
1 answer

How do BeginsWith operations work in ESQL?

How do you perform a BeginWith SQL operation in ESQL syntax?
ArpanDesai
  • 87
  • 3
  • 11
0
votes
1 answer

SOAP BODY Field in ESQL

How to get Content-Transfer-Encoding="CDATA" in my soap body. I have tried with DECLARE IDOC_BLOB BLOB A SBITSTREAM(InputRoot.BLOB,InputRoot.Properties.Encoding,InputRoot.Properties.CodedCharSetId ); DECLARE IDOC_CHAR CHAR …
Amrit
  • 137
  • 2
  • 2
  • 13
0
votes
1 answer

Limiting EF result set permanently by overriding ObjectQuery ESQL

Does anyone have any idea how to limit result set of EntityFramework permanently? I'm speaking about something like this Conditional Mapping. This is exactly what I want to achieve with one exception: I want to do this programmatically. That's…
0
votes
2 answers

entity framework 4 and NOT using ESQL

Starting to play around with EF4 and I notice there are several different ways to query the DB. Currently I created an .EDMX with my tables/objects created. In code when I use the Where method, it wants me to pass in a string for the 1st param, ESQL…
ammang
  • 1
0
votes
2 answers

SQL from EntityDataSource

Is there an easy way to see SQL statements generated by EntityDataSource? SQL Server profiling/tracing is not an option here.
Valera
  • 537
  • 7
  • 14
0
votes
1 answer

How to reference enum type in entity sql

I have the following (simplified) Entity SQL query: SELECT VALUE a FROM Customers AS a WHERE a.Status NOT IN { 2, 3 } The Status property is an enumeration type, call it CustomerStatus. The enumeration is defined in the EDMX file. As it is, this…
Tsahi Asher
  • 1,767
  • 15
  • 28