public void AddHorse(string name) { //create an object to be INSERTED Horse horse = new Horse(name); _context.Horses.Add(horse); _context.SaveChanges(); }
public void AddQuote(string text) { //create an object to be INSERTED Quote quote = new Quote(text); _context.Quotes.Add(quote); _context.SaveChanges(); }
public Samurai AddSamurai(Samurai samurai) { context.Samurais.Add(samurai); context.SaveChanges(); return(context.Samurais.OrderByDescending(x => x.Id).FirstOrDefault()); }
public void AddSamurai(Samurai samurai) { context.Add(samurai); context.SaveChanges(); }
public Battle AddBattle(Battle battle) { context.Battles.Add(battle); context.SaveChanges(); return(context.Battles.OrderByDescending(x => x.Id).FirstOrDefault()); }