Scipio
'FOREIGN KEY constraint failed in Sqlite using Entity Framework Core and WinUi 3
my current code:
https://github.com/SpaceWarlord/Roster
52 replies
'FOREIGN KEY constraint failed in Sqlite using Entity Framework Core and WinUi 3
within my model class should i store a reference to the entity?
something like this:
public class UserModel(){
UserEntity userEntity;
public UserModel(string id, string name, ){
userEntity=new UserEntity(id, name);
}
}
52 replies
'FOREIGN KEY constraint failed in Sqlite using Entity Framework Core and WinUi 3
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader()
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
52 replies