标签:www frame using kth core change ati serve console
Microsoft.EntityFrameworkCore
Microsoft.EntityFrameworkCore.SqlServer
Microsoft.EntityFrameworkCore.Tools
public class WebCrawlerDbContext : DbContext
{
public DbSet<TableName> YourTable { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlServer(@"Server=; Database=DbName; User ID=sa; Password=;");
}
}
迁移
add-migration xxx
update-database
using (var context = new WebCrawlerDbContext())
{
//do something
context.SaveChanges();
}
查询相关内容:加载相关数据
Getting Started With Entity Framework Core - Console
Entity Framework Core for Console
标签:www frame using kth core change ati serve console
原文地址:https://www.cnblogs.com/Lulus/p/11649986.html