public NotesListViewModel(MyNotesContext context)
 {
     if (context == null)
     {
         throw new ArgumentNullException("repository must not be null");
     }
     this._context = context;
     //create database if not exists
     if (!_context.DatabaseExists())
     {
         _context.CreateDatabase();
     }
 }
        private NoteDetailsViewModel(MyNotesContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context must not be null");
            }

            this._context = context;
            //create database if not exists
            if (!_context.DatabaseExists())
            {
                _context.CreateDatabase();
            }

            this.Note = new Note();
        }