public MyCharacterButton(string name)
 {
     this.name = name;
     this.dbCharacter = new DB.AkatokiEntities1 ().Characters.Find (name);
     if (dbCharacter == null) {
         throw new InvalidOperationException (string.Format("Name({0}) does not exist in DB", name));
     }
 }
Exemple #2
0
 public MyCharacter(string name)
 {
     this.name = name;
     this.data = Resource.GetDatabase<DB.AkatokiEntities1> ().Characters.Find (name);
     if (data == null) {
         throw new ArgumentException ("Name doesn't exist in Database");
     }
 }