odata

CRM 2011: Getting entity with Javascript

不打扰是莪最后的温柔 提交于 2019-12-18 10:29:31
问题 I am working on some CRM 2011 Online customisations and I need to get an entity using javascript. The entity I need will be based on the ID value of another field (a Contact entity) - this Contact ID I can get fine. The entity I want is a custom entity. There may be multiple matches based on the Contact ID so I just want to get the first one in the list (order not important) So far I have looked into a few ways to do this... OData - I couldn't find enough examples on this as to what query

How to use a MVC WebAPI OData endpoint securely?

≡放荡痞女 提交于 2019-12-18 09:23:25
问题 I have an OData endpoint defined at ~/odata/ , which doesn't need to be accessed unless a user has been authenticated (in fact, how would you secure this for non-authenticated users). I setup role-based authentication to this path in the web.config with: <location path="odata"> <system.web> <authorization> <allow roles="WaitConfirmation, etc...."/> </authorization> </system.web> </location> When a user logs in, I don't use the OData endpoint for authentication (primarily because I need to

oData WCF service - hide an element

↘锁芯ラ 提交于 2019-12-18 09:08:10
问题 I'm new to WCF. My web project has an ADO.NET Entity Data Model (aka EF edmx), which has the Entity Container Name JobSystemEntities . I've created a simple oData WCF data service which uses JobSystemEntities , and it works great: public class JobService : DataService<JobSystemEntities> { public static void InitializeService(DataServiceConfiguration config) { config.SetEntitySetAccessRule("Jobs", EntitySetRights.ReadSingle); } However, this exposes all of the properties on the Job. I would

Difference between Microsoft.OData.Core and Microsoft.Data.OData

落爺英雄遲暮 提交于 2019-12-18 06:07:46
问题 I am working on Web Api with OData enabled. I started working by referring to ( only the relevant dlls to the question are mentioned ) Microsoft.AspNet.WebApi.OData Microsoft.Data.OData Microsoft.Data.Edm System.Spatial But when I found out OData is by default case-sensitive , I look for a solution of case insensitive and I have gone through few post Support OData Uri case insensitive parse & ODataLib 6.7.0 Release then finally landed into nuget package Microsoft.OData.Core 6.9.0 which seems

Difference between Microsoft.OData.Core and Microsoft.Data.OData

混江龙づ霸主 提交于 2019-12-18 06:07:07
问题 I am working on Web Api with OData enabled. I started working by referring to ( only the relevant dlls to the question are mentioned ) Microsoft.AspNet.WebApi.OData Microsoft.Data.OData Microsoft.Data.Edm System.Spatial But when I found out OData is by default case-sensitive , I look for a solution of case insensitive and I have gone through few post Support OData Uri case insensitive parse & ODataLib 6.7.0 Release then finally landed into nuget package Microsoft.OData.Core 6.9.0 which seems

OData Url Length Limitations

时光毁灭记忆、已成空白 提交于 2019-12-18 05:42:22
问题 Browsers have limitation on the length of the URLs. IE has limitation that Url length should not exceed 2K characters. When I form a $filter equals query, I could compare with multiple input values. In such a case the length of the Url would exceed 2K. Does OData sets any limits on the length of the Url? Thanks 回答1: OData itself doesn't limit the length of the Url, but as you noted most clients and servers do. So usually it's a good practive to not produce URLs too long. The problem you refer

Initial loading of metadata fails due to “501 (Not Implemented)”

百般思念 提交于 2019-12-18 05:13:40
问题 I am trying to consume Northwind R/W OData service link: http://services.odata.org/V3/(S(frik5l2zde0sxh4jiifyhqo4))/OData/OData.svc/ as proxy/http/services.odata.org/V3/(S(frik5l2zde0sxh4jiifyhqo4))/OData/OData.svc which is working fine on local testing. Now when I want to ftp it to my domain, it's not working... NetworkError: 404 Not Found - http://{mydomain}/proxy/http/services.odata.org/V3/(S(frik5l2zde0sxh4jiifyhqo4))/OData/OData.svc/$metadata Using it without proxy like http://services

$select and $expand break ODataQueryOptions — how to fix?

别说谁变了你拦得住时间么 提交于 2019-12-18 03:35:10
问题 We are using Microsoft ASP.NET MVC OData WebAPI for our web services. Because of some data architecture issues surrounding hierarchy ID (which are outside the scope of this conversation), some of our GET operations have to use ODataQueryOptions and manually manipulate the expression to add additional restrictions. We do so like this (error handling code removed and calls to other methods inlined for clarity): public IQueryable<Person> Get(ODataQueryOptions<Person> oDataQueryOptions) {

Exclude property from WebApi OData (EF) response in c#

元气小坏坏 提交于 2019-12-18 01:22:30
问题 I'm working with a WebApi project in C# (EF code first) and I'm using OData. I have a "User" model with Id, Name, LastName, Email, and Password. In controller for example I have this code: // GET: odata/Users [EnableQuery] public IQueryable<User> GetUsers() { return db.Users; } If I call /odata/Users I'll get all the data: Id, Name, LastName, Email, and Password. How can I exclude Password from results but keep available in controller to make Linq queries? 回答1: I'm a little late to the topic

How to Connect to CRM Dynamics Online Odata endpoint LinqPad?

陌路散爱 提交于 2019-12-17 20:27:46
问题 I'm able to connect to self-hosted CRM sites just fine with the default Odata driver within LinqPad. The URI I use in the "WCF Data Services (OData) Connection" dialog for self-hosted is in the format http://MyServer.com/MyOrgName/xrmservices/2011/OrganizationData.svc. The user name is in the format "domain\username". When I attempt to follow the same format for an CRM Online instance, it doesn't work. I'm guessing it's either because of the https, or the windows live credentials, but don't