You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With an UWP release build (with UseDotNetNativeToolchain = true), this code snippet returns null although there is a row with the given ID in the database.
It works with an UWP debug build or on Android or iOS. (This runs inside a Xamarin app.)
public ILeistung GetLeistung(LeistungId? id)
{
if (id == null)
{
return null;
}
var dbobj = _dbConn.Table<DbLeistung>().FirstOrDefault(l => l.Id == id.Value.Value);
return dbobj == null ? null : CreateBOImplLeistung(dbobj);
}
_dbConn is a SQLiteConnection, and LeistungId is just a wrapper for an int property called "Value".
After this change, it works:
public ILeistung GetLeistung(LeistungId? id)
{
if (id == null)
{
return null;
}
var searchId = id.Value.Value;
var dbobj = _dbConn.Table<DbLeistung>().FirstOrDefault(l => l.Id == searchId);
return dbobj == null ? null : CreateBOImplLeistung(dbobj);
}
Problem is, I'd have to change 20 methods or so with similar code.
What is going on here? Maybe some optimization that goes wrong?
The text was updated successfully, but these errors were encountered:
With an UWP release build (with UseDotNetNativeToolchain = true), this code snippet returns null although there is a row with the given ID in the database.
It works with an UWP debug build or on Android or iOS. (This runs inside a Xamarin app.)
_dbConn is a SQLiteConnection, and LeistungId is just a wrapper for an int property called "Value".
After this change, it works:
Problem is, I'd have to change 20 methods or so with similar code.
What is going on here? Maybe some optimization that goes wrong?
The text was updated successfully, but these errors were encountered: