You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
463 B
19 lines
463 B
using System;
|
|
using System.Linq;
|
|
|
|
namespace CockRoachDBEntityFrameworkCoreTest
|
|
{
|
|
public class Program
|
|
{
|
|
private static void Main(string[] args)
|
|
{
|
|
using var db = new MyDbContext();
|
|
if (db.Database.EnsureCreated())
|
|
{
|
|
db.Set<User>().Add(new User { Name = "admin" });
|
|
db.SaveChanges();
|
|
}
|
|
Console.WriteLine(db.Set<User>().Count());
|
|
}
|
|
}
|
|
} |