<div class="post-text" itemprop="text">
I am trying to insert a row in the Azure table and the getting an error Cannot POST '/tables/Sate_Customer\n
I am successfully able to insert in 'Customer' and 'State' tables but not in State_Customer table, all are in the same database . By the way there is a FK constraint on CustomerId and StateId columns in this table.
publicclassState_Customer{[JsonProperty(PropertyName="id")]publicstringStateCustomerId{set; get;}[JsonProperty(PropertyName="CustomerId")]publicstringCustomerId{set; get;}[JsonProperty(PropertyName="StateId")]publicstringStateId{set; get;}[JsonProperty(PropertyName="createdAt")][CreatedAt]publicDateTimeCreatedAt{set; get;}[JsonProperty(PropertyName="updatedAt")][UpdatedAt]publicDateTimeUpdatedAt{set; get;}[JsonProperty(PropertyName="deleted")][Deleted]publicboolDeleted{set; get;}}public async voidInsertStateCustomer(){List<string> custIds =newList<string>(){"b1f57a2e-aeb4-4709-8b9a-cc5f35c4195f","f3a9035a-9869-42b9-a415-a8fa0d689c60"};string stId ="899becd5-199e-43b4-a4cc-f8883d0b8102";foreach(string strCusId in custIds){State_Customer stCust =newState_Customer(){CustomerId= strCusId,StateId= stId };
await stateCustomerTable.InsertAsync(stCust);}</div> <div class="post-taglist">c# asp.net-mvc</div>