public INoteRepository GetNoteRepository(IUser user) { if (user == null) { throw new ArgumentNullException("user"); } var rep = new DatabaseNoteRepository(connFactory, storageFactory, user); return(rep); }
public INoteRepository GetNoteRepository(string username) { DBUser user = null; using (var db = DbConfig.GetConnection ()) { user = db.First<DBUser> (u => u.Username == username); // TODO why doesn't ormlite raise this error? if (user == null) throw new ArgumentException(username); } var rep = new DatabaseNoteRepository (username); return rep; }
public INoteRepository GetNoteRepository(string username) { DBUser user = null; using (var db = DbConfig.GetConnection()) { user = db.First <DBUser> (u => u.Username == username); // TODO why doesn't ormlite raise this error? if (user == null) { throw new ArgumentException(username); } } var rep = new DatabaseNoteRepository(username); return(rep); }
public INoteRepository GetNoteRepository(string username) { var rep = new DatabaseNoteRepository (username); return rep; }
public INoteRepository GetNoteRepository(IUser user) { var rep = new DatabaseNoteRepository (connFactory, storageFactory, user); return rep; }
public INoteRepository GetNoteRepository(IUser user) { if (user == null) throw new ArgumentNullException ("user"); var rep = new DatabaseNoteRepository (connFactory, storageFactory, user); return rep; }