Ejemplo n.º 1
0
 public async Task AddHistory(CreateHistoryCommand command)
 {
     await this.Add(new BookHistory
     {
         BookId  = command.BookId,
         Created = command.Created,
         Type    = command.Type
     });
 }
Ejemplo n.º 2
0
        public async Task <IHttpActionResult> Delete(int id)
        {
            var command = new CreateHistoryCommand
            {
                BookId  = id,
                Type    = BookHistoryType.Deleted,
                Created = DateTime.Now
            };

            return(await this.Try(() => this._bookHistoryRepository.AddHistory(command)));
        }