{"action":"closed","issue":{"url":"https://api.github.com/repos/object/Simple.OData.Client/issues/157","repository_url":"https://api.github.com/repos/object/Simple.OData.Client","labels_url":"https://api.github.com/repos/object/Simple.OData.Client/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/object/Simple.OData.Client/issues/157/comments","events_url":"https://api.github.com/repos/object/Simple.OData.Client/issues/157/events","html_url":"https://github.com/object/Simple.OData.Client/issues/157","id":106513810,"number":157,"title":"InsertEntryAsync - Value cannot be null. Parameter name: source","user":{"login":"NoMercy","id":121787,"avatar_url":"https://avatars.githubusercontent.com/u/121787?v=3","gravatar_id":"","url":"https://api.github.com/users/NoMercy","html_url":"https://github.com/NoMercy","followers_url":"https://api.github.com/users/NoMercy/followers","following_url":"https://api.github.com/users/NoMercy/following{/other_user}","gists_url":"https://api.github.com/users/NoMercy/gists{/gist_id}","starred_url":"https://api.github.com/users/NoMercy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NoMercy/subscriptions","organizations_url":"https://api.github.com/users/NoMercy/orgs","repos_url":"https://api.github.com/users/NoMercy/repos","events_url":"https://api.github.com/users/NoMercy/events{/privacy}","received_events_url":"https://api.github.com/users/NoMercy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/object/Simple.OData.Client/labels/invalid","name":"invalid","color":"e6e6e6"}],"state":"closed","locked":false,"assignee":{"login":"object","id":252126,"avatar_url":"https://avatars.githubusercontent.com/u/252126?v=3","gravatar_id":"","url":"https://api.github.com/users/object","html_url":"https://github.com/object","followers_url":"https://api.github.com/users/object/followers","following_url":"https://api.github.com/users/object/following{/other_user}","gists_url":"https://api.github.com/users/object/gists{/gist_id}","starred_url":"https://api.github.com/users/object/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/object/subscriptions","organizations_url":"https://api.github.com/users/object/orgs","repos_url":"https://api.github.com/users/object/repos","events_url":"https://api.github.com/users/object/events{/privacy}","received_events_url":"https://api.github.com/users/object/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-09-15T09:03:45Z","updated_at":"2016-04-24T18:11:48Z","closed_at":"2016-04-24T18:11:48Z","body":"Hello,\r\n\r\nI am not able to fix one problem.\r\nWhen I am inserting (just one model, others from Edm are working) I get exception message which is not descriptive. It is:\r\nSystem.ArgumentNullException: Value cannot be null. Parameter name: source\r\n\r\nIt is falling somewhere in InsertEntryAsync function.\r\n\r\nI see in fiddler, that request on metadata was sent and it is all. It is probably falling when the insert request is created.\r\n\r\nInsert in Postman works:\r\n{\r\n  \"@odata.context\":\"https://Endpoint/$metadata#TaskAssignmentRules/$entity\",\r\n\"DelayMinutes\":900,\"IsByPreference\":true,\"Position\":1,\r\n\"PreferenceLevel\":2,\"TaskId\":1032543\r\n}\r\n\r\nThe second think I observated is that I am able to insert with null collections from Postman. It is not possible with Simple.OData (I must create empty collection). It is not important now.\r\n\r\nIt is not all code but maybe it could help.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/121787/9872339/08333c5c-5b99-11e5-9146-a210e8e7c760.png)\r\n\r\n\r\n    public class TaskAssignmentRuleViewModel\r\n    {\r\n        [JsonProperty(\"DelayMinutes\")]\r\n        public int DelayMinutes { get; set; }\r\n\r\n        [JsonProperty(\"ErrorMessage\")]\r\n        public string ErrorMessage { get; set; }\r\n\r\n        [JsonProperty(\"ExecutedOn\")]\r\n        public DateTimeOffset? ExecutedOn { get; set; }\r\n\r\n        [JsonProperty(\"Id\")]\r\n        public int Id { get; set; }\r\n\r\n        [JsonProperty(\"IsByPreference\")]\r\n        public bool IsByPreference { get; set; }\r\n\r\n        [JsonProperty(\"Position\")]\r\n        public int Position { get; set; }\r\n\r\n        [JsonProperty(\"PreferenceLevel\")]\r\n        public int? PreferenceLevel { get; set; }\r\n\r\n        [JsonProperty(\"TaskId\")]\r\n        public int TaskId { get; set; }\r\n\r\n        [JsonProperty(\"TaskOrderDate\")]\r\n        public DateTimeOffset? TaskOrderDate { get; set; }\r\n\r\n        [JsonProperty(\"AssigneeIds\")]\r\n        public IList<int> AssigneeIds { get; set; }\r\n\r\n        /// <summary>\r\n        /// Tags that will be used for assignees selection.\r\n        /// </summary>\r\n        [JsonProperty(\"Tags\")]\r\n        public IList<int> Tags { get; set; }\r\n\r\n    }\r\n\r\nI tried to debug it and it is better when it is not asynchronous. But still the same problem.\r\n\r\n// Create new object\r\nvar newRule = new TaskAssignmentRuleViewModel\r\n{\r\n  DelayMinutes = 90,\r\n  IsByPreference = true,\r\n  Position = 1,\r\n  PreferenceLevel = 2,\r\n  TaskId = taskId,\r\n  AssigneeIds = emptyList\r\n};\r\n\r\n\r\nvar c = clientBeta.For<TaskAssignmentRuleViewModel>();\r\n// var c = clientBeta.For(\"TaskAssignmentRules\"); \r\nvar s = c.Set(newRule);\r\n// Insert new rule\r\nvar ruleId = s.InsertEntryAsync(true, cancellationToken).Result;\r\n\r\nI was using version 4.8.4. I am using 4.10 now.\r\nCan you check it, please?\r\nThank you."}}