odata

Could not load type 'Microsoft.AspNetCore.Mvc.Internal.IActionSelectorDecisionTreeProvider'

自作多情 提交于 2019-12-24 09:49:52
问题 I'm attempting to build the AutoOdataEF project with little success. I'm getting the following exception: Generated.OData.EF.API> Application startup exception: System.TypeLoadException: Could not load type 'Microsoft.AspNetCore.Mvc.Internal.IActionSelectorDecisionTreeProvider' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Generated.OData.EF.API> at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig,

Why OData Web API returns JSON only

一世执手 提交于 2019-12-24 08:55:50
问题 This is weird! I create OData Web API with ASP.NET MVC 5. Return IQueriable from the controller, nothing special. But in some reason it constantly returns JSON when I need XML . I send GET from Fiddler with Accept: application/xml - no reaction. I try to force removing JsonFormater in the server code - no reaction again. It always returns JSON. What do I miss? 回答1: Try with - Accept: application/atom+xml . AFAIK in OData V3 there are three protocals (ref) - Atom (application/atom+xml) JSON

Why OData Web API returns JSON only

只愿长相守 提交于 2019-12-24 08:53:18
问题 This is weird! I create OData Web API with ASP.NET MVC 5. Return IQueriable from the controller, nothing special. But in some reason it constantly returns JSON when I need XML . I send GET from Fiddler with Accept: application/xml - no reaction. I try to force removing JsonFormater in the server code - no reaction again. It always returns JSON. What do I miss? 回答1: Try with - Accept: application/atom+xml . AFAIK in OData V3 there are three protocals (ref) - Atom (application/atom+xml) JSON

You should specify a parent contact or account error in Dynamics CRM

旧巷老猫 提交于 2019-12-24 08:16:48
问题 I am trying to create a new incident through postman in Dynamics CRM but I am getting the following error: You should specify a parent contact or account Which I assumed that is asking for customerid to be sent so I added it on postman like: { "description": "Test", "ed_egresssenttorentadmin": true, "note['_customerid_value@odata.bind']":"f686f062-e542-e811-a955-000d3ab27a43", "note['_ownerid_value@odata.bind']":"a7b7fcb7-a64e-e811-a96f-000d3ab384bc" } but I still get the same error, any idea

Projecting an IEnumerable inside an Projected IQueryable making N Requests to the Database

若如初见. 提交于 2019-12-24 08:04:09
问题 I'm making an Asp.net Core Api and one of the Actions of the Controller i need to return an IQueryable of a DTO, but one of the properties is an IEnumerable of another DTO in a relationship one to many in the database model of EF. For example: public class Customer { public int Id { get; set; } public string Name { get; set; } public DateTime Birthday { get; set; } public List<Order> Orders { get; set; } } public class Order { public int OrderNumber { get; set; } public Customer Customer {

OData Source Component in SSIS Hanging

无人久伴 提交于 2019-12-24 07:57:55
问题 I'm using SSIS and would like to pull in the public NADAC data from this page using the OData connection: https://data.medicaid.gov/Drug-Pricing-and-Payment/NADAC-National-Average-Drug-Acquisition-Cost-/a4y5-998d. You can find the OData endpoint on their page by clicking on the ellipse and selecting Access Data via OData . The v4 endpoint is: https://data.medicaid.gov/api/odata/v4/a4y5-998d In SSIS (Visual Studio 2015, Version 14.0.500.272 targeted at SQL Server 2016), I am able to create an

Creating a new complex entry on OData [sapui]

被刻印的时光 ゝ 提交于 2019-12-24 07:49:22
问题 I have this complex OData model: <EntityType Name="ApprovalsRequest"> <Key> <PropertyRef Name="IdUser"/> <PropertyRef Name="RequestId"/> </Key> <Property Name="ApprovalTime" Type="Edm.DateTime" Nullable="true"/> <Property Name="IdUser" Type="Edm.Int32" Nullable="false"/> <Property Name="RequestId" Type="Edm.Int32" Nullable="false"/> <Property Name="Request" Type="Edm.Int32" Nullable="true"/> <Property Name="Status" Type="Edm.String"/> <Property Name="User" Type="Edm.Int32" Nullable="true"/>

How to perform a LINQ join on IQueryable<T> in odata controller

╄→гoц情女王★ 提交于 2019-12-24 07:48:43
问题 I have a WebAPI method which uses the OData Query Options to return data to the client. The entity has cityid and I want cityname from another entity using joins. I have tried using below Api method, which is incomplete. Entity1:- public partial class UU_DeliveryCharges { public int DeliveryChargeId { get; set; } public Nullable<int> CityId { get; set; } public Nullable<int> VehicleTypeId { get; set; } public Nullable<decimal> MileRate { get; set; } public Nullable<decimal> FlatRate { get;

OData Patch is not updating the database

£可爱£侵袭症+ 提交于 2019-12-24 07:37:52
问题 I have a WebApi 2 controller. I want to use OData Patch on one of the controllers. Here's what I did so far. I added the following line in WebApiConfig config.MapODataServiceRoute("odata", "odata", GenerateEdmModle()); private static Microsoft.OData.Edm.IEdmModel GenerateEdmModle() { var builder = new ODataConventionModelBuilder(); builder.EntitySet<Auth>("Auths"); return builder.GetEdmModel(); } Then in the controller, This is how I'm trying to use patch method [HttpPatch] public async Task

ASP.NET Web API OData: Navigation Links when using Composite Keys

老子叫甜甜 提交于 2019-12-24 07:18:41
问题 The OData questions keep coming :) I have an Entity with a composite key, like this one: public class Entity { public virtual Int32 FirstId { get; set; } public virtual Guid SecondId { get; set; } public virtual First First { get; set; } public virtual Second Second { get; set; } } I created a CompositeKeyRoutingConvention that handles the composite keys for ODataController s. Everything is working, except Navigation Links like this one: http://localhost:51590/odata/Entities(FirstId=1