public HomeController(IUserRepo uR, ICharacterRepo cR) { uRepo = uR; cRepo = cR; if (uRepo.Users.Count == 0) { User user = new User() { Email = "*****@*****.**", Name = "Sandra Heart", UserName = "******", Password = "******" }; uRepo.AddUser(user); user = new User() { Email = "*****@*****.**", Name = "Phillip Grey", UserName = "******", Password = "******" }; uRepo.AddUser(user); } if (cRepo.Characters.Count == 0) { User user = uRepo.GetUserByName("Phillip Grey"); Character character = new Character() { Name = "Alphie, Terror of the Night", IsMonster = true, IsNPC = false, IsPlayer = false, Species = "Pig Monster", Gender = "male", Description = "Orange, short, fat, large fangs." }; character.Abilities.Add("Sharp claws and fangs that can kill and maim."); character.Abilities.Add("Piercing red eyes for hypnotizing prey."); character.Abilities.Add("A cruel laugh that paralyzes all who hear it."); cRepo.AddCharacter(character); user.Characters.Add(character); character = new Character() { Name = "Cleo SharpTongue", IsMonster = false, IsNPC = true, IsPlayer = false, Species = "Halfling", Gender = "female", Description = "Small, but tough bartender. Spends her days adventuring" + "and her nights busting heads at her tavern. She has brown hair and" + "brown eyes, and if you don't try to mess with her, her smile will " + "melt your heart." }; character.Abilities.Add("Handy with a sword."); character.Abilities.Add("Makes a mean ale."); character.Abilities.Add("A killer stare that makes grown men run to their mamas."); cRepo.AddCharacter(character); user.Characters.Add(character); } }
public CharactersController(ICharacterRepo characterRepo) { _characterRepo = characterRepo; }
public CharacterController(ICharacterRepo repository, IMapper mapper) { _repository = repository; _mapper = mapper; }