public void AddResult(UserTestDto result) { Guard.WhenArgument(result, "result").IsNull().Throw(); UserTest userTest = Mapper.MapTo <UserTest>(result); userTestRepo.Add(userTest); Saver.SaveChanges(); }
public void TestInit() { kernel = DependencyInjectionConfig.CreateKernel(); context = kernel.Get <IMoviesContext>(); movies = new EfGenericRepository <Movies>(context); genresRepo = new EfGenericRepository <Genres>(context); commentsRepo = new EfGenericRepository <Comments>(context); userRepo = new EfGenericRepository <Users>(context); likesRepo = new EfGenericRepository <Likes>(context); dislikesRepo = new EfGenericRepository <Dislikes>(context); saver = new UoW(context); userRepo.Add(user); context.Movies.Add(movie); context.SaveChanges(); }