Word AddWord(VocabularyDbContext context, string word, LanguageType language) { Word entity = context.Words.SingleOrDefault(w => w.Value == word && w.Language == (int)language); if (entity == null) { entity = new Word { Value = word, Language = (int)language }; context.Words.Add(entity); } return(entity); }
public AccountController(VocabularyDbContext db) : this(new UserManager <ApplicationUser>(new UserStore <ApplicationUser>(db))) { this.db = db; repo = new Repository(db); }
public UserBookController() { db = new VocabularyDbContext(); repo = new Repository(db); }
public HomeController() { db = new VocabularyDbContext(); repo = new Repository(db); }
public UserBookController() { db = new VocabularyDbContext(); repo = new Repository(db); }
public HomeController() { db = new VocabularyDbContext(); repo = new Repository(db); }
public AccountController(VocabularyDbContext db) : this(new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(db))) { this.db = db; repo = new Repository(db); }
public Repository(VocabularyDbContext db) { this._db = db; }