Tools: I am using Xamarin forms MVVM and SQLite-Net-pcl
Error cannot convert from 'System.Type' to 'string'
how to set up basic ForeignKey with different names for primarykey and foreignkey? I am getting an error on line
[ForeignKey(typeof(ProductModel))]
ProductModel class
*class ProductModel
{
[PrimaryKey, AutoIncrement]
public int ProductId { get; set; }
public string ProductName { get; set; }
public string ProductDescription { get; set; }
public string ProductURL { get; set; }
}
ordermodel class
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Sqlite;
class OrderModel
{
[PrimaryKey, AutoIncrement]
public int OrderId { get; set; }
[ForeignKey(typeof(ProductModel))]
public int ProdcutId_FK { get; set; }
public int OrderQty { get; set; }
}*