Hi there,
I am working on OData CRUD Concept in F&O Data Entities using HTTP Delete Method in C#. Unfortunately, i can't able to delete the entity. Actually i am receiving the HTTP 404 Exception. I am using the below code to delete the entity.
Data entity used : SecurityUserRoleOrganizations
public async Task<string> DeleteAsync(AXEntity entity)
{
var fullUrl = ApiUrl + entity.LogicalName + "(";
foreach (var a in entity.Attributes)
{
fullUrl = fullUrl + a.Key + "='" + a.Value.ToString() + "',";
}
var request = new HttpRequestMessage(new HttpMethod("Delete"), fullUrl)
{
Content = new StringContent("{}", Encoding.UTF8, "application/json")
};
var response = await _baseAuthorization.GetHttpCliente().SendAsync(request);
string isSuccess = ResponseValidator.EnsureSuccessStatusCode(response);
return isSuccess;
}
Could anyone help me to implement the delete call or sample to delete the F&O Data Entity Values using OData?
Thanks,
Jeyaprakash A