Using the F# MVC 5 Visual Studio extension and it works perfect for GET requests. However, I'm getting a No parameterless constructor defined for this object
error when trying to perform a POST
.
Here's the method in the HomeController
:
[<HttpPost>]
member this.Edit product =
Products.updateProduct product
this.RedirectToAction("Index")
Here's the Product
type it's using where I guess the problem is originating:
type Product = {
ProductId: int
ProductName: string
ProductCount: int
ProductPrice: string
}
Is it possible to fix this within the type or is there something else I'm missing?