由于BootstrapperClass已经过时使用Prism 7,我想使用PrismApplicationClass 更改我的C#WPF应用程序.
有没有人知道如何使用Bootstrapper : UnityBootstrapper新的重构Prism 6应用程序PrismApplication?
我问,因为有关这些预发行版的文档非常有限,而且我不是最了解我需要做什么才能看到Prism源代码.
我有一个包含 3 个属性的模型:
public class SomeModel
{
[Key]
public int SomeInt { get; set; }
public string SomeString { get; set; }
public TimeSpan Time { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
如果我尝试将这样的模型添加到我的 SQLite 数据库中,则会引发异常。
using (var db = new MyDataContext())
{
var item = new SomeModel { SomeInt = 123, SomeString = "a string" , Time = new TimeSpan(1,2,3)};
db.SomeModels.Add(item);
try
{
db.SaveChanges();
}
catch (Exception ex)
{
Console.WriteLine(ex);
Console.ReadLine();
throw;
}
}
Run Code Online (Sandbox Code Playgroud)
例外情况:
System.NotSupportedException: "There is no store type corresponding …Run Code Online (Sandbox Code Playgroud)