Here are my models
public class Category
{
public int Id { get; set; }
public string Name { get; set; }
public List<CategoryDetail> CategoryDetails { get; set; }
}
public class CategoryDetail
{
public int Id { get; set; }
public string Url { get; set; }
public IFormFile File { get; set; }
public Category Category { get; set; }
}
and my controller function is
[HttpPost]
public IActionResult Create([FromForm] Category category)
{
throw new NotImplementedException();
}
the parameter inside the controller method is always null when I pass data through postman.