public async Task Run() { using (var scope = IOCManager.Instance.Container.BeginLifetimeScope()) { using (var uow = scope.Resolve <IUnitOfWork>()) { ISomeService someService = scope.Resolve <ISomeService>(); await someService.InsertAsync(string.Format("EFTest.WithRepositories {0}", DateTime.Now.ToLongTimeString())); var posts = await someService.GetAllAsync(); var post = await someService.FindByIdAsync(posts.Last().Id); uow.SaveChanges(); } Console.WriteLine("DONE"); Console.ReadLine(); } }