public void Create(Note noteToAdd, IEnumerable <Category> newCategories) { NoteWithCategories note = NoteWithCategories.Convert(noteToAdd, newCategories); session.Store(note); session.SaveChanges(); }
public void Create(Note noteToAdd, IEnumerable <Category> newCategories) { NoteWithCategories note = NoteWithCategories.Convert(noteToAdd, newCategories); using (var notes = redisClient.GetTypedClient <NoteWithCategories>()) { note.Id = notes.GetNextSequence().AsString(); notes.Store(note); } }
public void Create(Note noteToAdd, IEnumerable <Category> newCategories) { NoteWithCategories note = NoteWithCategories.Convert(noteToAdd, newCategories); notes.Insert(note); }