因此,我们确信我们将在国际上采用我们的产品,并最终需要将其国际化.在我们进行的过程中,您会建议我们做多少国际化?
我想换句话说,现在是否有任何国际化变得容易,但如果我们让代码库成熟并且如果我们现在选择开始这样做会不会减慢我们的速度,那么会更糟糕吗?
使用的技术:C#,WPF,WinForms
给定一个实体和一个 DbContext,如下所示:
public class Entity
{
public int Id {get;set;}
public string LargeString {get;set;}
}
public class MyDbContext : DbContext
{
public DbSet<Entity> Entities {get;set;}
}
Run Code Online (Sandbox Code Playgroud)
数据库中存储的实体有Id
42 个,并LargeString
包含约 2 兆字节的 XML。以下内容需要半分钟左右,有时会给出OutOfMemoryException
:
using (var dbContext = new MyDbContext())
{
var entity = await dbContext.Entities.SingleAsync(e => e.Id == 42);
}
Run Code Online (Sandbox Code Playgroud)
同时,以下 Dapper 查询以毫秒为单位执行:
using (var dbContext = new MyDbContext())
{
var entity = await dbContext.Database.Connection
.Query<Entity>("SELECT Id, LargeString FROM Entities WHERE Id = 42")
.SingleAsync();
} …
Run Code Online (Sandbox Code Playgroud)