public void Cleanup() { foreach (string username in usernames) { db_user.DeleteUser(username); } }
/// <summary> /// Deletes a user. /// </summary> /// <param name="username"></param> /// <returns>string</returns> public string Delete(string username) { string result; result = db_user.DeleteUser(username); return(result); }
public void Cleanup() { List <Order> orders = db_order.FindOrderByUsername(user.Username); foreach (Order order in orders) { db_order.DeleteOrder(order.Id); } db_user.DeleteUser(user.Username); }
public void Cleanup() { //Deletes test products foreach (Product product in products) { db_product.DeleteProduct(product.Id); } //Deletes test orders foreach (Order order in orders) { db_order.DeleteOrder(order.Id); } //Deletes test userproduct foreach (OrderDetail order_detail in orderdetails) { db_orderdetail.DeleteOrderDetail(order_detail); } db_user.DeleteUser(user.Username); }