asp.net-core

.Net Core System.Drawing error with AWS Lambda

我的未来我决定 提交于 2021-02-10 20:45:10
问题 I am trying to generate a QRCode using .Net Core with AWS Lambda. But it seems there is an issue using System.Drawing libraries with lambda. Everything works fine until I start using any System.Drawing functions. This question has been asked before but there does not seem to be any good solutions. Here is the code I have currently in the controller: QRCodeGenerator qrGenerator = new QRCodeGenerator(); QRCodeData qrCodeData = qrGenerator.CreateQrCode("hello", QRCodeGenerator.ECCLevel.Q);

Updating many to many in Entity Framework core

一曲冷凌霜 提交于 2021-02-10 19:23:37
问题 Here are the relevant classes and their configuration: public class Product { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long ProductId { get; set; } [Required] public string ProductName { get; set; } public ICollection<ProductSpecification> ProductSpecifications { get; set; } } public class ProductAttributeValue { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long ProductAttributeValueId { get; set; } [Required] public string

Updating many to many in Entity Framework core

吃可爱长大的小学妹 提交于 2021-02-10 19:22:35
问题 Here are the relevant classes and their configuration: public class Product { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long ProductId { get; set; } [Required] public string ProductName { get; set; } public ICollection<ProductSpecification> ProductSpecifications { get; set; } } public class ProductAttributeValue { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long ProductAttributeValueId { get; set; } [Required] public string

Updating many to many in Entity Framework core

老子叫甜甜 提交于 2021-02-10 19:21:49
问题 Here are the relevant classes and their configuration: public class Product { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long ProductId { get; set; } [Required] public string ProductName { get; set; } public ICollection<ProductSpecification> ProductSpecifications { get; set; } } public class ProductAttributeValue { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long ProductAttributeValueId { get; set; } [Required] public string

Updating many to many in Entity Framework core

北慕城南 提交于 2021-02-10 19:21:14
问题 Here are the relevant classes and their configuration: public class Product { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long ProductId { get; set; } [Required] public string ProductName { get; set; } public ICollection<ProductSpecification> ProductSpecifications { get; set; } } public class ProductAttributeValue { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long ProductAttributeValueId { get; set; } [Required] public string

Unable to load static file once it has been published to Azure, using ASP.NET Core 2.1

二次信任 提交于 2021-02-10 18:56:12
问题 Using ASP.NET Core 2.1 , I'm trying to load the same static file locally on my dev machine (through Visual Studio 2017) and after the website has been published to the hosting environment (Azure Web Apps). Consider the directory hierarchy in which the static file ( file.xml ) to be served resides inside the web root: wwwroot css images js xml file.xml Here's my controller to load the file: public class DevelopmentController : Controller { private readonly IHostingEnvironment _env; public

Unable to load static file once it has been published to Azure, using ASP.NET Core 2.1

风格不统一 提交于 2021-02-10 18:55:55
问题 Using ASP.NET Core 2.1 , I'm trying to load the same static file locally on my dev machine (through Visual Studio 2017) and after the website has been published to the hosting environment (Azure Web Apps). Consider the directory hierarchy in which the static file ( file.xml ) to be served resides inside the web root: wwwroot css images js xml file.xml Here's my controller to load the file: public class DevelopmentController : Controller { private readonly IHostingEnvironment _env; public

Unable to load static file once it has been published to Azure, using ASP.NET Core 2.1

一个人想着一个人 提交于 2021-02-10 18:54:28
问题 Using ASP.NET Core 2.1 , I'm trying to load the same static file locally on my dev machine (through Visual Studio 2017) and after the website has been published to the hosting environment (Azure Web Apps). Consider the directory hierarchy in which the static file ( file.xml ) to be served resides inside the web root: wwwroot css images js xml file.xml Here's my controller to load the file: public class DevelopmentController : Controller { private readonly IHostingEnvironment _env; public

How to add a Schema Filter to just one Swashbuckle api document version

▼魔方 西西 提交于 2021-02-10 18:43:07
问题 I have an issue, I use Swashbuckle 4 and it doesn't support polymorph, I found two filters that do that. One DocumentFilter and one SchemaFilter. They work like charme. But now I have an issue, I add a second version to my api. But I have a polymorph model which is just supported by version 2. But I found no way to add these filters just to one api version, because they are added at Startup to the SwaggerGenOptions. I'm little bit shocked that Swashbuckle does not seem to support Filters per

How to add a Schema Filter to just one Swashbuckle api document version

陌路散爱 提交于 2021-02-10 18:35:36
问题 I have an issue, I use Swashbuckle 4 and it doesn't support polymorph, I found two filters that do that. One DocumentFilter and one SchemaFilter. They work like charme. But now I have an issue, I add a second version to my api. But I have a polymorph model which is just supported by version 2. But I found no way to add these filters just to one api version, because they are added at Startup to the SwaggerGenOptions. I'm little bit shocked that Swashbuckle does not seem to support Filters per