public void Test_update_entity_with_self_increase_PK() { var student = DapperExtension.FirstOrDefault <Student>(); if (student != null) { student.Name = "update"; int count = DapperExtension.Update(student); Assert.Equal(1, count); } }
public void Test_DateTimeToTicksConverter() { var log = new Log { Message = nameof(this.Test_DateTimeToTicksConverter), UpdateTimeTicks = DateTime.Now, }; int count = DapperExtension.Insert(log); Assert.Equal(1, count); log = DapperExtension.FirstOrDefault <Log>(); }
public void Test_UriToStringConverter(string url) { var log = new Log { Message = url, UpdateTimeTicks = DateTime.Now, Url = url == null ? null : new Uri(url), }; int count = DapperExtension.Insert(log); Assert.Equal(1, count); log = DapperExtension.FirstOrDefault <Log>(); }
public void Test_BoolToZeroOneConverter() { var course = new Course { Name = "insert", UpdateTime = DateTime.Now, CreateTime = DateTime.Now, IsDeleted = true, }; int count = DapperExtension.Insert(course); Assert.Equal(1, count); course = DapperExtension.FirstOrDefault <Course>(); }
public void Test_select_from_view() { var log = DapperExtension.FirstOrDefault <VLog>(); }