All is right but in my case i have two class like this
namespace WebAPI.Model
{
public class ProductsModel
{
[Table("products")]
public class Products
{
[Key]
public int slno { get; set; }
public int productId { get; set; }
public string ProductName { get; set; }
public int Price { get; set; }
}
}
}
After deleting the upper class it works fine for me.