Ejemplo n.º 1
0
        public void Test_delete_by_entity()
        {
            using var dbContext = new ScaffoldingDbContext();
            var student = new Student
            {
                Name       = "insert",
                UpdateTime = DateTime.Now,
            };

            dbContext.Add(student);
            dbContext.SaveChanges();
            int count = DapperExtension.Delete(student);

            Assert.Equal(1, count);
        }