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)

37 results in tag: odata

Client-side call to a WCF DataService [WebGet] function

I have an EF4 model with a stored procedure that I want to call from the client. The server code looks like this:...[WebGet] public IQueryable<SalesData> GetSalesReport(int reportType, int yr, int m, int d) { DateTime dt = new DateTime(yr, m, ...
entity-framework odata stored-procedures wcf
asked by Ronny

Request error with WCF Data Services

Its my first time setting up an OData Service and I'm of course having some problems......The problem is that I can't get the service running, I keep getting an "Request Error". ...I have ...researched... on what the problem can be and I found that a comm...
entity-framework odata wcf-data-services
asked by LazyTarget

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

OData exception The complex type 'WebTools.Order' refers to the entity type 'WebTools.Customer' through the property 'Customer'

I'm getting started with OData and Entity Framework....I created a Controller that exposes Customer. In the model (edmx) there's only one Entity (Customer) and everything works fine (data is being rendered)....Now, when I add a second entity (Order) (Upd...
asp.net-web-api entity-framework odata
asked by Patrice Calvé

WebApi OData: $filter 'any' or 'all' query not working

First, using the ASP.NET WebApi tutorials I've created a basic ...ApiController that exposes an Entity Framework model through OData.... The service works to return json for OData $filter queries....When I perform OData ...$filter queries that include "an...
asp.net-web-api entity-framework odata
asked by Chris Pietschmann

OData $expand, DTOs, and Entity Framework

I have a basic WebApi service setup with a database first EF DataModel set up. I am running the nightly builds of WebApi, EF6, and the WebApi OData packages. (WebApi: 5.1.0-alpha1, EF: 6.1.0-alpha1, WebApi OData: 5.1.0-alpha1)...The database has two table...
asp.net-web-api c# entity-framework odata
asked by Schandlich

Upgraded to EF 6 (RTM) - Getting System.Data.Entity.Core.Objects.ObjectContext cannot be used for return type System.Data.Objects

Just upgraded a .NET 4.5 WCF Service, which also has an OData service to use EF 6. The OData service was of course working prior to the upgrade. Now, when attempting to query the OData service or even just browse to it from Visual Studio 2012, I get the...
entity-framework odata wcf-data-services
asked by Grandizer

Web API OData with Stored Procedures

Can I leverage the power of OData without EF?...I'm using an existing DB and creating my models using stored procedures to retrieve from DB....AFAIK, when using ...$filter... for example using OData with EF - the filter will be applied at the DB layer....
asp.net-web-api entity-framework odata
asked by thedude

Using WCF Data Services 5.6.0 with Entity Framework 6+

I have been trying to get our WCF Data Service to work with the new Entity Framework 6....I found this ...article... which explains a supposedly easy and painless way to fix this issue....I followed the directions posted exactly. When I first install:...I...
.net entity-framework-6 odata wcf
asked by user1480865

How do you use optimistic concurrency with WebAPI OData controller

I've got a WebAPI OData controller which is using the Delta to do partial updates of my entity....In my entity framework model I've got a Version field. This is a rowversion in the SQL Server database and is mapped to a byte array in Entity Framework with...
asp.net asp.net-web-api asp.net-web-api-odata entity-framework-6 odata
asked by BenCr

Transactional batch processing with OData

Working with Web API OData, I have $batch processing working, however, the persistence to the database is not Transactional. If I include multiple requests in a Changeset in my request, and one of those items fails, the other still completes, because eac...
asp.net-web-api entity-framework odata
asked by Gareth Suarez

OData over a "View" of unioned data in Entity Framework

I'm developing an OData service which exposes a model created with Entity Framework 6. These entities are read only and are quite large to load. (Several gigabytes)...To accomplish this I'm using Microsoft.OData.EntityFrameworkProvider, (I'm not currentl...
c# entity-framework entity-framework-6 odata
asked by Kent

VS 2013 Lightswitch new record creation with identity field

I have a very basic testbed Lightswitch 2013 application, using an OData data source via Web API 2 and beyond that Entity Framework 6. The table in question has an auto-incrementing id field which is the primary key. ...All is good in the sense that I can...
asp.net-web-api2 entity-framework-6 odata visual-studio-2013 visual-studio-lightswitch
asked by Alan B

Adding a custom query backed Navigation Property to ODataConventionModelBuilder

Situation...I created the following Model classes...public class Car { public int Id {get;set;} public string Name {get;set;} public virtual ICollection<PartState> PartStates {get;set; } } public class PartState { public int Id {get;set;...
asp.net-web-api asp.net-web-api2 c# entity-framework odata
asked by LunicLynx

How do I add a OData key value to my Entity Framework class?

I am using MVC 5, Microsoft OData 2.1, and Entity Framework 6. I am trying to consume an OData feed that I wrote using the EntitySetController class. when I add the service reference and it consumes the OData metadata, it can see my resource, but when I...
asp.net-mvc c# entity-framework odata
asked by Steve

how to implement computed field for model in web api odata using EF 6

I'm creating a web api odata controller and all is well until I try to add a derived field to the model. I don't want the field to exist in the database, and the field does not need to be queryable....Given model;...public class Foo { public Int64 Id...
api entity-framework-6 odata web
asked by Rickster

Handling Dates with OData v4, EF6 and Web API v2.2

I'm in the midst of upgrading from v1-3 to v4, but I've run into a few problems....My understanding is that DateTime is unsupported, and I have to always use DateTimeOffset. Fine....But before I was storing Sql ...date... data type in the DateTime, now it...
asp.net-web-api asp.net-web-api2 entity-framework odata
asked by Tim

The type System.DateTime is not a supported type. Change to use System.DateTimeOffset

We are creating a WebApi 2.2 service and are using the technologies listed above. Our backend datastore is MySql 5.6. We are using dotConnect for MySql to work with the data store. In the database, there is a RowVersion column with a type of Timestamp....
asp.net-web-api dotconnect entity-framework-6 mysql odata
asked by A Bit of Help

Get Linq Expression from FilterQueryOption throw CLR exception

We have a filter string based on ...OData conventions...We need to parse this string, and execute a whereClause on our EntityFramework6 Model-First generated model....Steps:...Convert our DataModel ...DbContext... to ...IEdmlModel... with Breeze EdmBuilde...
c# entity-framework-6 linq linq-expressions odata
asked by Céline Lenaerts

WCF OData Service and EF 6 issue - Can't expose entities using Odata Service

I am using WCF Data Service (Odata) with .NET framework 4.5.1 and EF 6.1. I have used code first approach to create EF model. When I reference this EF model (AddProjectModel.cs) to WCF OData Service (WcfDataService1.svc), it throws following error: ...Err...
entity-framework odata wcf
asked by user659469

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!