零度框架 1.0 版本正式发布,共 184 项改进。

This commit is contained in:
administrator committed 2024-05-31 12:28:02 +08:00
1 parent c14a872b77
commit baf06cd88f
182 files changed
+2537 -1613

No files matched your search

@@ -0,0 +1,18 @@
// Copyright (c) HelloShop Corporation. All rights reserved.
// See the license file in the project root for more information.
using HelloShop.ProductService.EntityFrameworks;
using Microsoft.EntityFrameworkCore;
namespace HelloShop.ProductService.UnitTests.Utilities
{
public class FakeDbContextFactory : IDbContextFactory<ProductServiceDbContext>
{
public ProductServiceDbContext CreateDbContext()
{
var options = new DbContextOptionsBuilder<ProductServiceDbContext>().UseInMemoryDatabase($"InMemoryTestDb-{DateTimeOffset.UtcNow.ToFileTime()}").Options;
return new ProductServiceDbContext(options);
}
}
}