Inheritance: Rainy.Interfaces.INoteRepository
Exemple #1
0
        public INoteRepository GetNoteRepository(IUser user)
        {
            if (user == null)
            {
                throw new ArgumentNullException("user");
            }

            var rep = new DatabaseNoteRepository(connFactory, storageFactory, user);

            return(rep);
        }
Exemple #2
0
 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;
 }
Exemple #3
0
        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);
        }
Exemple #4
0
 public INoteRepository GetNoteRepository(string username)
 {
     var rep = new DatabaseNoteRepository (username);
     return rep;
 }
Exemple #5
0
 public INoteRepository GetNoteRepository(IUser user)
 {
     var rep = new DatabaseNoteRepository (connFactory, storageFactory, user);
     return rep;
 }
Exemple #6
0
        public INoteRepository GetNoteRepository(IUser user)
        {
            if (user == null)
                throw new ArgumentNullException ("user");

            var rep = new DatabaseNoteRepository (connFactory, storageFactory, user);
            return rep;
        }