小编Tom*_*Tom的帖子

如何实现新的PrismApplication来替换Bootstrapper类

由于BootstrapperClass已经过时使用Prism 7,我想使用PrismApplicationClass 更改我的C#WPF应用程序.

有没有人知道如何使用Bootstrapper : UnityBootstrapper新的重构Prism 6应用程序PrismApplication

我问,因为有关这些预发行版的文档非常有限,而且我不是最了解我需要做什么才能看到Prism源代码.

prism

17
推荐指数
2
解决办法
8864
查看次数

如何使用 EF6 处理 TimeSpan 将其保存在 SQLite 中

我有一个包含 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)

c# sqlite entity-framework

1
推荐指数
1
解决办法
937
查看次数

标签 统计

c# ×1

entity-framework ×1

prism ×1

sqlite ×1