예제 #1
0
        public void PopulateDatabase()
        {
            IWorkoutDAL _db = new WorkoutDAL(_connectionString);

            using (TransactionScope scope = new TransactionScope())
            {
                PopulateExercise(_db);
                scope.Complete();
            }
        }
예제 #2
0
        public void Initialize()
        {
            _tran = new TransactionScope();

            PasswordHelper pass = new PasswordHelper("password");
            User           test = new User();
            WorkoutDAL     _dal = new WorkoutDAL();

            test.Email     = "*****@*****.**";
            test.FirstName = "Micah";
            test.LastName  = "knabb";

            test.Hash = pass.Hash;
            test.Salt = pass.Salt;

            test.PictureUrl = "Picture";
            test.Username   = "******";
            test.RoleID     = 1;

            testID = _dal.AddUser(test);
            Assert.IsNotNull(testID);
        }
예제 #3
0
        public static IWorkoutContainerDAL CreateWorkoutContainerDAL()
        {
            IWorkoutContainerDAL workoutContainerDAL = new WorkoutDAL();

            return(workoutContainerDAL);
        }
예제 #4
0
 //Constructor that accepts a connectionString from the Presentation Layer,
 //Use the connectionString to pass into a new instance of the Data Access Layer class
 //WorkoutDAL
 public WorkoutBLL(string connectionString)
 {
     data = new WorkoutDAL(connectionString);
 }