I have a class like;
[Serializable]
public class ApiClass
{
public string UserId { get; set; }
public DateTime CreateTime { get; set; }
}
And in my web api controller method is like;
public Guid Post(ApiClass apiClass)
{
// do some stuff with parameter.
}
when I send object as json request, for some reason, if I use [Serializable] attribute for my class, it does not resolved. But if I remove it I can get values from parameter.
What would be the reason?