Last active
August 29, 2015 14:04
-
-
Save ajpinedam/57f52532b17498c53b1d to your computer and use it in GitHub Desktop.
BanDay C# Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (var db = _devDoContextFactory.Create()) | |
{ | |
var userExceptions = {"pinedax", "Melvyn Perez"}; | |
var roleExceptions = {"Admins", "Dioxes"}; | |
var defaultSearch = {"dembow"}; | |
//...... | |
//...... | |
//...... | |
//...... | |
var _random = new Random(); | |
var id = _random.Next(_devDoUsersNumber); | |
//...... | |
//...... | |
//...... | |
//...... | |
//...... | |
//...... | |
var banUser = db.Users.FirstOrDefault(u => u.Id == id); | |
if(banUser == null) | |
{ | |
//...... | |
//...... | |
banUser = db.Users.FirstOrDefault(/*condition cannot be shown*/); | |
} | |
//...... | |
//...... | |
//...... | |
// ==> This line was added by Carlos Vasquez on Jul 24 2014 | |
if(banUser == null) | |
return db.Users.FirstOrDefault(u.User.FirstName == "Ahmed"); | |
return banUser; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment