In a Xamarin Android app I have a repository class with:
public T Get<T>(int id) where T : IDatabaseTable, new()
{
using (var db = new SQLiteConnection(dbPath))
{
return db.Table<T>().Single(x => x.id == id);
}
}
where:
public interface IDatabaseTable
{
int id { get; set; }
}
This was working fine until the latest update to Xamarin which included the required migration from Xamarin Studio to Visual Studio. It's now throwing System.NotSupportedException: Cannot compile: Parameter. Why would be? Any help appreciated.
Aucun commentaire:
Enregistrer un commentaire