Exemplo n.º 1
0
        public async ValueTask <ReadingNote> DeleteReadingNoteAsync(ReadingNote readingNote)
        {
            EntityEntry <ReadingNote> readingNoteEntityEntry = this.ReadingNotes.Remove(readingNote);

            await this.SaveChangesAsync();

            return(readingNoteEntityEntry.Entity);
        }
Exemplo n.º 2
0
        public async ValueTask <ReadingNote> InsertReadingNoteAsync(ReadingNote readingNote)
        {
            EntityEntry <ReadingNote> readingNoteEntityEntry = await this.ReadingNotes.AddAsync(readingNote);

            await this.SaveChangesAsync();

            return(readingNoteEntityEntry.Entity);
        }