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
2
votes
1 answer

Entity Framework 5 SaveChanges Not Working, No Error

None of the many questions on this topic seem to match my situation. I have a large data model. In certain cases, only a few of the fields need be displayed on the UI, so for those I replaced the LINQ to Entity query that pulls in everything with an…
1
vote
1 answer

Entity SQL Sort Then LINQ to Entities GroupBy Doesn't Return IOrderedQueryable

Works: My UI sends up entity sql sort expressions from a jqGrid to my DAL and then applies some Where clauses that get returned to my service layer. My service layer will then create a PaginatedList object that applies the Skip()..Take() to the…
diegohb
  • 1,857
  • 2
  • 16
  • 34
1
vote
1 answer

Class name is a reserved word when query provider compiles ELINQ query to ESQL

I'm receiving this error: System.Data.DataException: An exception occurred while initializing the database. See the InnerException for details. ---> System.Data.EntitySqlException: 'All' is a reserved keyword and cannot be used as an alias,…
1
vote
0 answers

Entity Framework Can't Load Related Entity

Ever since I started using POCO in my projects, I've been having problem querying data that references other entity on the query. The annoying part of it is that trying the same query on LINQPad works well. For example, this esql query below:…
Syma
  • 574
  • 1
  • 4
  • 11
1
vote
2 answers

cast with linqToEntity(Esql)

my code : public List GetBook(string NameField, object Value) { var queryESQL = @"select VALUE Book from Book where Cast(Book." + NameField + " as string) like '%M%'"; var query =…
mrJack
  • 1,001
  • 6
  • 17
  • 33
1
vote
3 answers

Problem with Entity SQL

I am learning Entity Framework 4 from book. And I try to make some Query with Entity SQL like this : using (var context = new BAEntities()) { string str = "SELECT VALUE c " + "FROM BAEntities.Contacts " + …
adaapanya
  • 91
  • 4
1
vote
1 answer

How to query data from multiple tables in EF?

This the query I have which is used to get data from multiple tables from SQL server SELECT Blob.transactionId, Blob.status, COUNT(Bsp._id) AS processed, Blob.total, Blob.reason, (SELECT MAX(MyMaxName) FROM (VALUES …
akhil
  • 1,649
  • 3
  • 19
  • 31
1
vote
1 answer

Dynamic ObjectQuery against EF 4 using parsed Entity SQL

I am trying to create a completely dynamic way to query entity framework using entity sql, where the type T in ObjectQuery (the table name, or entity name) is not known at compile time, and is passed into a method as a string, public class…
Sean Thoman
  • 7,429
  • 6
  • 56
  • 103
1
vote
1 answer

How to String Concatenation in Entity SQL?

A very quick question SQL: SELECT VALUE ROW( ('#' + CAST(pack.PackageID as Edm.String)) as PackageID) From ProductPackage It show error, edm.String not found, I also try String or Varchar,still error. I have read that reference but no…
Cheung
  • 15,293
  • 19
  • 63
  • 93
1
vote
1 answer

In Entity SQL Is Self Join Possible?

I have a question in regards to entity SQL where I need to do a lookup within a table itself based on a particular column value. I don't really know how to word this question, but I'll do my best. Also I don't know the syntax of entity SQL very…
John
  • 43
  • 3
1
vote
1 answer

How Select From Parent Based on Child Property in EntityFramework and ESQL

I have a parent/child table in Entity Framework and I need to select some row from parent based on child primary key. I write these code: List s = (from all in DB.TbProfiles where all.TbMaharat.Any(c =>…
Mahdi
  • 649
  • 8
  • 18
1
vote
2 answers

Entity SQL Datetime Syntax error

Anyone know What is wrong with my syntax here? I am making dynamic eSQL Queries and running into an error when trying to make where condition for DateTime data type. This is the error: The query syntax is not valid. Near term '2011', line 1, column…
Sean
  • 203
  • 4
  • 14
1
vote
0 answers

ESQL throws Object Context error on server

I am getting a The "ObjectContext instance has been disposed and can no longer be used for operations that require a connection error" for a code snippet - on the second query (the DataBind). It works fine in development. Development uses Entity…
1
vote
1 answer

Compiled Entity SQL query and OrderBy

I'm trying to come up with an compiled query using Entity SQL and I'm getting this error on ToList() line: LINQ to Entities does not recognize the method 'System.Data.Objects.ObjectQuery`1[BLL.Company] OrderBy(System.String,…
dstr
  • 8,362
  • 12
  • 66
  • 106
1
vote
0 answers

Building Active Directory Operations in IIB without Java or JCN

The Case is : to build an integration service with active directory, this service has many operations such as create user, activate user, change password , ...etc I have developed theses operations using JCN but, the client refused any java…
Abu taha
  • 61
  • 1
  • 12