public static void GetInfoModifiedAtr(string connectionString) { using (var db = new CustomDatabaseWithAttrFix(connectionString)) { //It is expected that the .ToUnixTimeSeconds() will return the same value as IdSrv because it performs a UTC conversion before converting to seconds. var svc = GetUserAccountServiceModifiedAtr(db); var account = svc.GetByUsername("bob"); if (account != null) { //When fetching the account the first time, the lastUpdated DateTime Kind is reported as "Unspecified" Console.WriteLine("From FixedAtr: {0} - {1}", account.LastUpdated.ToString("s"), account.LastUpdated.Kind); } } }
private static CustomUserAccountServiceWithAttrFix GetUserAccountServiceModifiedAtr(CustomDatabaseWithAttrFix database) { var repo = new CustomUserAccountRepositoryWithAttrFix(database); var svc = new CustomUserAccountServiceWithAttrFix(CustomConfigWithAttrFix.Config, repo); return(svc); }
private static CustomUserAccountServiceWithAttrFix GetUserAccountServiceModifiedAtr(CustomDatabaseWithAttrFix database) { var repo = new CustomUserAccountRepositoryWithAttrFix(database); var svc = new CustomUserAccountServiceWithAttrFix(CustomConfigWithAttrFix.Config, repo); return svc; }