I am using restangular post method to send my JSON to Web API. At console window i can see the $scope.school is getting populated with the details but at web API i am not getting 'fileSet' object values.
My angular code is: -
$scope.school = {
'class': '94E38941-5A97-4A9B-B82A-8D53C9DBEE96',
'inputInstanceId': 'CBBCD28D-F144-45E2-A494-C767549BD3AF',
'inboxType': '8',
'schoolTitle': $scope.value1,
'schoolDescription': $scope.value2,
'schoolContext': $scope.ContextListL1["Value"],
'schoolGuid ': $cookieStore.get('objschoolid'),
'fileSet': {
'fName': fileName,
'fileUploadId': fileId
}
}
where as my api calling code in angular is
Restangular.one(routeString).post('', $scope.school, params, headers).then(function (resp)
My API class is
public class CreateClassDTO
{
public Guid class { get; set; }
public Guid inputInstanceId { get; set; }
public int inboxType { get; set; }
public string schoolTitle { get; set; }
public string schoolDescription { get; set; }
public string schoolContext { get; set; }
public Guid schoolGuid { get; set; }
public List<FileuploadResult> fileSet { get; set; }
}
public class FileuploadResult
{
public string fName { get; set; }
public Guid fileUploadId { get; set; }
}