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")); }
public async Task <IActionResult> ShareNote(UsersNotesModel usersNotes) { await dbConnection.ShareNote((int)usersNotes.Note_Id, (int)usersNotes.User_Id, User.Identity.Name); return(RedirectToAction("MyNotes")); }