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

Entity Framework 6 - Knowledge Base (KB)

30 results for: in tag: iqueryable

How to handle paging IQueryable with Linq To Entities? (problem with OrderBy)

I am currently building a simple ASP.NET MVC site using Linq to Entities. My first foray into this world was nerd dinner, which is where I found the paginated list code that I am attempting to use. The code looks as follows:...public class PaginatedList<T...
entity-framework generics iqueryable
asked by Sergio

IQueryable<> from stored procedure (entity framework)

I want to get ...IQueryable<>... result when executing stored procedure. ...Here is piece of code that works fine: ...IQueryable<SomeEntitiy> someEntities; var globbalyFilteredSomeEntities = from se in m_Entities.SomeEntitiy where se.Glob...
.net entity-framework iqueryable linq-to-entities stored-procedures
asked by arena-ru

LINQ - Join Two Entities into One IQueryable Complex Type - EF4 and ASP.Net MVC

I have code like:... var entityX = this._xService.GetAll(); var entityY = this._yService.GetAll(); ...Both are returned as IEnumerable types. I need to inner join the two into a something like a JoinedList class that has to be IQueryable....I'm looking f...
asp.net-mvc entity-framework iqueryable linq
asked by Ted

Differences when using IEnumerable and IQueryable as a type of ObjectSet

As I understand it when I use LINQ extension methods (with lambda expression syntax) on ...IQueryable... that is in the fact instance of ...ObjectSet... they are translated into LINQ to SQL queries. What I mean is that command...IQueryable<User> users = d...
.net c# entity-framework ienumerable iqueryable
asked by Rasto

Including child Objects in Entityframework

I want to include child objects on an IQueryable list.....I want to include a child object on selected columns of some table type IQueryable list.....I tried like this:...IQueryable<Persons> persons = Context.Persons.Select(x=> new persons{Pkid=x.pkid, Fi...
entity-framework iqueryable linq-to-entities
asked by Sunny43

How to assign a property value of an IQueryable<T>?

I'm using Entity Framework 4.1 Code First. In my entity, I have three date/time properties:...public class MyEntity { [Key] public Id { get; set; } public DateTime FromDate { get; set; } public DateTime ToDate { get; set; } [NotMap...
entity entity-framework expression-trees iqueryable linq
asked by Matt Johnson-Pint

.NET Entity Framework - IEnumerable VS. IQueryable

Please see this line of code. This is an invocation of a stored procedure, which returns an ...ObjectResult<long?>.... In order to extract the long values I added the Select:...dbContext.FindCoursesWithKeywords(keywords).Select(l => l.Value); ...Based on ...
entity entity-framework frameworks ienumerable iqueryable
asked by justabuzz

Linq query with Contains only works with is IQueryable is in external variable

I am using Entity Framework with Linq to Entities, trying to select some data from my database. When I create a Linq query that uses the method ...IQueryable<int>.Contains..., it can only filter the data if I use an external variable! Let me show some exa...
asp.net c# entity-framework iqueryable linq-to-entities
asked by tyron

Cast IQueryable<EntityObject> to IQueryable<Specific>

We are trying to cast an instance of ...IQueryable<EntityObject>... to an ...IQueryable<SpecificEntityObject>..., the ...SpecificEntityObject... type is only known at runtime....We have tried using the code below, which does not compile because The type o...
c# casting entity-framework iqueryable linq
asked by Stuart.Sklinar

LINQ OrderBy not ordering .. changing nothing .. why?

Any idea why the LINQ OrderBy is not working in following code, (have no errors but method does not sort ...)...First my own type...public class IQLinksView { public int id { get; set; } public int catid { get; set; } public in...
entity-framework iqueryable linq sql-order-by
asked by user1415838

Using EF and WebAPI, how can I return a ViewModel AND support IQueryable/OData?

I've got an ASP.NET WebAPI project. I've recently created EntityFramework entities for all my data tables. But I don't want to expose my data layer & schema to my users. How can I map my entities to a ViewModel (automapper?) ...and... provide IQueryable r...
asp.net-web-api entity-framework iqueryable odata
asked by Eric Falsken

Composing Expression<Func<T, bool>> predicates

I have a method that returns an...Expression<Func<T, bool>> ...When I use this as a predicate in a where clause in EF this works fine, until I try to add more items to the predicate with Expression.Or() I run into the following exception:...The parameter...
c# entity-framework extension-methods iqueryable lambda
asked by Oxymoron

Using IQueryable select to filter columns

I've been exploring WEB API based on the guide at www.asp.net, and I've run into a problem when trying to filter columns from a table....My code is simply this:... // GET api/Admin public IEnumerable<Product> GetProducts(testvar = "") { ...
asp.net-mvc asp.net-web-api c# entity-framework iqueryable
asked by ASouthorn

Implement IQueryable wrapper to translate result objects

Update 2013-08-22:...After having a look at the 'Building an IQueryable provider series' (thanks for the link!) I got a bit further. I updated the code accordingly. It is still not fully working though. If I understand the tutorial correctly, the ...GetEn...
.net c# entity-framework iqueryable linq
asked by cyan902

Cannot implicitly convert type System.Linq.IQueryable<string> to string

I have two tables named Rank and CrewMembers.I want to fetch the name of rank which is present in Rank table on the basis of id of CrewMember.I have passed the crewId as a parameter and on the basis of that the method would return the Rank of that specifi...
c# entity-framework iqueryable linq
asked by prers

Merging two iqueryables that are projected to one entity from different tables

I have tried ...This answer..., ...This one... and ...this one... to merge two iqueryables. But I always receive the following error:...The type 'Estudio' appears in two structurally incompatible initializations within a single LINQ to Entities query. A t...
c# entity-framework iqueryable linq merge
asked by amalbala

DateTime or int to string inside IQueryable?

How do I convert DateTime or int to string inside IQueryable? I need to do something like this, but without ...ToString()..., which throws ...System.NotSupportedException... exception:...IQueryable filteredEntities = myIQueryableCollection .Where(o =>...
c# entity-framework entity-framework-6 iqueryable
asked by SoftwareFactor

How to apply an expression tree for IQueryable?

Is there any way to apply a manually created expression tree from one IQueryable to another? For example:...IQueryable<string> p = Enumerable.Empty<string>().AsQueryable(); p = p.Where(pp => pp[0] == 'A'); p = p.Skip(2).Take(4); p = p.OrderBy(pp => pp.Len...
c# entity-framework expression-trees iqueryable linq-to-sql
asked by dyatchenko

EF6: Use reference/lookup data with IQueryable

I want to use a pre-loaded lookup data from a list within a query. I need the query to return as IQueryable because it is used in a grid & being paged (not included here). I need the Labels to load from the lookup to avoid joins (more are in the actual c...
c# entity-framework-6 iqueryable linq lookup
asked by Steve Kinyon

How to map an int to its enum description using AutoMapper during a queryable projection?

Here is the enum extension method to get its description attribute....public static string GetDescription(this Enum enumeration) { if (enumeration == null) throw new ArgumentNullException(); var value = enumeration.ToString(); var typ...
automapper automapper-4 entity-framework-6 enums iqueryable
asked by BBauer42

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

Try for free now