zzz projects Entity Framework 6 EF 6
Home EF Core Articles Knowledge Base Online Examples
  • Home
  • EF Core
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework 6 - Knowledge Base (KB)

22 results in tag: dynamic-linq

LINQ Dynamic Group Using Several Columns

I need to translate the following LINQ query to Dynamic LINQ that accepts several grouping columns based on user input. Basically I have a bunch of dropdownlists that apply groupings and I don't want to enumerate every combination of groupings. If Dynamic...
.net c# dynamic-linq entity-framework linq
asked by Daniel Coffman

Using the OrElse and AndAlso expression methods, throw an exception.

I am trying to build an expression tree programmatically....I have in my input, a list of condition classes which have the following form:...public class Filter { public string field { get; set; } public string operator { get; set; } public st...
dynamic-linq entity-framework linq linq-to-entities
asked by Lorenzo

DbSet<T>.Include() causes SELECT N+1 when used in extension method

I have an extension on IQueryable that allows passing in delimited string of property names which, when used causes query not to construct JOINs and effectively causes SELECT N+1 issue....What I noticed is that if I call native EF extension .Include("prop...
dynamic-linq entity-framework linq-to-entities objectquery
asked by zam6ak

Dynamic LINQ DateTime Comparison String Building - Linq To Entities

I'm using the dynamic LINQ library by Scott Guthrie together with Entity Framework and C#....I have to build my where string into a variable based on several factors and then pass the string variable to the where clause. For some reason, this will work:..
c# dynamic-linq entity-framework linq string
asked by Ricketts

How to execute a LINQ to Entities query, pulling values from an existing resultset variable instead of against the DB

To provide some context, I'm using jqGrid to conduct a server side search on a datetime field, truncating the time portion server side, and then fetching results via a stored procedure. This is being done using System.Dynamic.Linq, which I've modified sli...
dynamic-linq entity-framework-6 jqgrid orm stored-procedures
asked by RizJa

Dynamic Linq and use of Between

I am having a Dynamic Linq where It should perform comparison between two integers. I tried so many but none of them worked for me....Code...db.Bibs.Where(" Id >= 1 && Id<1000 ") db.Bibs.Where(" Id between 1 && 1000 ") ...How to form this string to make...
c#-4.0 dynamic-linq entity-framework-6 linq-to-entities
asked by DonMax

Using Dynamic LINQ Where in a one-to-many Entity Framework relationship

I am using EF 6 and .net 4.5. I have a "Documents" table with the PK "DocumentId" (Int) and another column, "Title". I have another table called "DocumentFilters" with the columns "DocumentId" (Int) and "DocGUID" (Guid). There is a FK on "Doc Id" between...
c# dynamic-linq entity-framework-6 ienumerable one-to-many
asked by Lenny K

EF6 IQueryable dynamic linq Where(predicate, values) with DbFunctions.TruncateTime

In my simplified example i have an object with following properties:...Name (string)...BirthDateTimeStamp (datetime)...I need to ba able to build dynamic queries in the following way...var predicate = "Name = @0"; var values = new object[]{"Ed"}; myIQuery...
dynamic-linq entity-framework-6 sql-server
asked by JMan

Creating dynamic expression for entity framework

I've created a generic expression builder that builds up a predicate based on collection of conditions. I pass the predicate to a generic method in the repository. I think that expression builder works fine and creates the desired predicate although the S...
c# dynamic-linq entity-framework expression-trees
asked by ssmsexe

how to order by a dynamic column name in EntityFramework?

I am trying to get following code working , This was working fine for MSSQL , but since i changed to use mySql it is not working... records.Content = db.areas .Where(x => x.Name.Contains(filter))) .Orde...
asp.net-mvc c# dynamic-linq entity-framework mysql
asked by Kas

How to fix 'No property or field exists in type' error?

I got this error when trying to sort any columns that are not in the Order table, if I use ...OrderBy("Customer.CompanyName" + " " + sortDir)... the error will gone but all the columns will become unable to sort. The ...OrderBy... method used below come f...
asp.net-mvc c# dynamic-linq entity-framework linq
asked by Phantom

Dynamic Linq + Entity Framework: datetime modifications for dynamic select

I am trying to find a way to move UTC time to Local before doing a sql grouping. I am using the System.Linq.Dynamic (managed here ...https://github.com/kahanu/System.Linq.Dynamic... ). It works great for doing dynamic selects without having at compile ti...
.net c# dynamic-linq entity-framework-6
asked by TravisWhidden

Entity Framework + DayOfWeek

Using the ...System.Linq.Dynamic... (managed here ...https://github.com/kahanu/System.Linq.Dynamic... ), I am trying to capture the ...DayOfWeek... field found on the ...DateTime... for aggregation purposes using Entity Framework 6 (or greater)....Previou...
c# dynamic-linq entity-framework-6 expression-trees linq
asked by TravisWhidden

Dynamic LINQ - Entity Framework 6 - Update Records for Dynamic Select

C# rookie. Below is my code, been trying for hours now to get this to update some fields in my DB and tried many different implementations without luck.... // Select all fields to update using (var db = new Entities()) { ...
c# dynamic-linq entity-framework-6
asked by user3333134

System.Linq.Dynamic: How to declare an array for .Contains?

I am trying to do a simple SQL ...where field in (2,3,4)... with Dynamic Linq. kahanu's rehosted ...Microsoft Dynamic Linq Library... has a ....Contains()... that you can use in Linq like this:...var results = myTable.Where("@0.Contains(outerIt.abc)", new...
c# dynamic-linq entity-framework-6
asked by Zachary Scott

Using Dynamic Linq to Filter entity by datetimeoffset columns

I am doing a dynamic linq using the DynamicLinq dll where-in I am sending the dynamic filter constructed like the one below..."CreatedDate=System.DateTimeOffset.Parse(\"2017-11-17 22:07:04.9192538 +00:00\")", ...However, i am getting an error that System ...
c# dynamic-linq entity-framework-6 linq
asked by Saran

Dynamic LINQ with ICollection.Any()

How can I use Dynamic LINQ on navigation properties that are collections?...For example, if I want all the orders with certain no. I could do something like:...var searchTerm = "123456"; var query = context.Orders.Where(o => o.ErpOrderNo.Contains(searchTe...
dynamic-linq entity-framework-6 linq
asked by Adanay Martín

Dynamic Projection in linq with List of fieldNames

I wanna do projection on fields of my collection and nested collection in each of entity, I use EntityFramework 6.2 I've do that with dynamic query like bellow code...Students.Select("new (Name,Family,new(Category.Name) as Category)"); ...it was worked b...
c# dynamic-linq entity-framework entity-framework-6 linq
asked by Masoud Mirzaei

How to get first day of month/year etc?

I'm using ...Linq.Dynamic... to query a ...SQL Server... database....I have a date field named 'EnteredOn' which I need to convert to first second of that month (or year, minute etc)...I tried basically everything, but everything throws an error...Here ar...
date dynamic-linq entity-framework sql-server
asked by Yisroel M. Olewski

EF Core "InvalidOperationException: Include has been used on non entity queryable" for navigation property even after explicit include

I've created a sample project which uses the following packages - ...GraphQL...GraphQL.EntityFramework...System.Linq.Dynamic.Core...The idea here is to translate the selection done in the GraphQL query and pass that onto EntityFramework in order not to ov...
c# dynamic-linq entity-framework graphql linq
asked by Soham Dasgupta

Page 1 of 2
  • 1
  • 2
  • »

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Save your entities 20× faster with EF Extensions
SaveChanges vs BulkSaveChanges

EF Extensions
Try for free now
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!