public void PopulateDatabase() { IWorkoutDAL _db = new WorkoutDAL(_connectionString); using (TransactionScope scope = new TransactionScope()) { PopulateExercise(_db); scope.Complete(); } }
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); }
public static IWorkoutContainerDAL CreateWorkoutContainerDAL() { IWorkoutContainerDAL workoutContainerDAL = new WorkoutDAL(); return(workoutContainerDAL); }
//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); }