public void Edit(WordArgs args) { var word = GetWord(args.Id); word.Example = args.Example; word.Name = args.Name; word.Picture = args.Picture; word.Level = args.Level; word.Translate = args.Translate; word.Priority = args.Priority; _context.SaveChanges(); }
public void Create(WordArgs args) { var word = new Word() { Id = Guid.NewGuid(), Example = args.Example, Name = args.Name, Picture = args.Picture, Level = args.Level, Translate = args.Translate, LastUpdate = args.LastUpdate, Priority = args.Priority, ThemeId = args.ThemeId }; _context.Words.Add(word); _context.SaveChanges(); }