public void SavingAndRetrievingTest() { DateTime Now = DateTime.Now; SavingAndRetrievingAction(new AllDates { Sql_date = Now }, entity => DateTimeAssert.AreEqual(entity.Sql_date, Now, true)); }
public async Task SavingAndRetrievingTestAsync() { DateTime Now = DateTime.Now; return(SavingAndRetrievingActionAsync(new AllDates { Sql_date = Now }, entity => DateTimeAssert.AreEqual(entity.Sql_date, Now, true))); }
public void SavingAndRetrievingTest() { DateTimeOffset NowOS = DateTimeOffset.Now; SavingAndRetrievingAction(new AllDates { Sql_datetimeoffset = NowOS }, entity => DateTimeAssert.AreEqual(entity.Sql_datetimeoffset, NowOS)); }
public Task SavingAndRetrievingTestAsync() { try { DateTime Now = DateTime.Now; return(SavingAndRetrievingActionAsync(new AllDates { Sql_date = Now }, entity => DateTimeAssert.AreEqual(entity.Sql_date, Now, true))); } catch (Exception ex) { return(Task.FromException <object>(ex)); } }
public async Task SavingAndRetrievingTestAsync() { DateTime Now = DateTime.Now; await(SavingAndRetrievingActionAsync(new AllDates { Sql_datetime2 = Now }, entity => DateTimeAssert.AreEqual(entity.Sql_datetime2, Now))); await(SavingAndRetrievingActionAsync(new AllDates { Sql_datetime2 = DateTime.MinValue }, entity => DateTimeAssert.AreEqual(entity.Sql_datetime2, DateTime.MinValue))); await(SavingAndRetrievingActionAsync(new AllDates { Sql_datetime2 = DateTime.MaxValue }, entity => DateTimeAssert.AreEqual(entity.Sql_datetime2, DateTime.MaxValue))); }
public void SavingAndRetrievingTest() { DateTime Now = DateTime.Now; SavingAndRetrievingAction(new AllDates { Sql_datetime2 = Now }, entity => DateTimeAssert.AreEqual(entity.Sql_datetime2, Now)); SavingAndRetrievingAction(new AllDates { Sql_datetime2 = DateTime.MinValue }, entity => DateTimeAssert.AreEqual(entity.Sql_datetime2, DateTime.MinValue)); SavingAndRetrievingAction(new AllDates { Sql_datetime2 = DateTime.MaxValue }, entity => DateTimeAssert.AreEqual(entity.Sql_datetime2, DateTime.MaxValue)); }