Exemplo n.º 1
0
 public async Task <IActionResult> CreateNote(UsersNotesModel note)
 {
     if (ModelState.IsValid)
     {
         await dbConnection.CreateNote(new Note { Header = note.Header, Content = note.Content, Timestamp = note.Timestamp.ToBinary() }, User.Identity.Name);
     }
     return(RedirectToAction("MyNotes"));
 }
Exemplo n.º 2
0
        public async Task <IActionResult> ShareNote(UsersNotesModel usersNotes)
        {
            await dbConnection.ShareNote((int)usersNotes.Note_Id, (int)usersNotes.User_Id, User.Identity.Name);

            return(RedirectToAction("MyNotes"));
        }