public static Task <int> InsertDefaultsAsync <T>(this SqliteSessionBase session) where T : class { return(Task.Factory.StartNew( () => { using (session.Lock()) { return session.InsertDefaults <T>(); } })); }