小编Wiz*_*nlo的帖子

ArgumentNullException:值不能为null.参数名称:构造函数

我正在使用EF 7构建一个ASP.NET 5 MVC应用程序.我有三个模型:The Book类:

public class Book : IBook<MangaChapter>, IHasThumbnail, IBugChecker
    {
        public Book()
        {
            Chapters = new List<MangaChapter>();
        }

        [Key]
        public int ID { get; set; }


        [Required]
        public string Title { get; set; }

        [Required]
        [DataType(DataType.MultilineText)]
        public string Description { get; set; }

        public string ThumbnailPath { get; set; }

        public virtual IList<Chapter> Chapters { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

章节类:

public class MangaChapter : IChapter<MangaBook>, IHasThumbnail
    {
        public MangaChapter()
        {
            PagesPath = new List<Path>();
        }

        [Key]
        public …
Run Code Online (Sandbox Code Playgroud)

c# asp.net asp.net-mvc entity-framework

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

CloudConfigurationManager与.NetCoreApp不兼容

我一直在尝试使用以下代码行访问dotnet核心中的Azure Blob存储:

CloudStorageAccount account = CloudStorageAccount.Parse(
            CloudConfigurationManager.GetSetting("<MyStorageName>_AzureStorageConnectionString")
            );
Run Code Online (Sandbox Code Playgroud)

事先我已经安装了所需的Azure SDK,并将其更新为dotnet核心兼容版本,然后,由于CloudConfigurationManager缺少,我安装了Microsoft.WindowsAzure.ConfigurationManager,根据这个答案.更新此程序包后,程序包还原失败,并显示以下错误消息:

Package Microsoft.WindowsAzure.ConfigurationManager 3.2.1 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.WindowsAzure.ConfigurationManager 3.2.1 supports: net40 (.NETFramework,Version=v4.0)
One or more packages are incompatible with .NETCoreApp,Version=v1.0.
Run Code Online (Sandbox Code Playgroud)

是否有任何选择才能开始CloudConfigurationManager工作或者我是否需要找到解决方法?

.net c# azure azure-storage

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