public async Task <bool> AddAsync(Author author) { try { await _context.AddAsync(author); await _context.SaveChangesAsync(); } catch (Exception) { return(false); } return(true); }
public async Task <bool> AddAsync(Genre genre) { try { await _context.AddAsync(genre); await _context.SaveChangesAsync(); } catch (Exception) { return(false); } return(true); }
public async Task <bool> AddAsync(Category category) { try { await _context.AddAsync(category); await _context.SaveChangesAsync(); } catch (Exception) { return(false); } return(true); }
public async Task <bool> AddAsync(Publisher pub) { try { await _context.AddAsync(pub); await _context.SaveChangesAsync(); } catch (Exception) { return(false); } return(true); }
public async Task <bool> AddAsync(Book book) { try { await _context.AddAsync(book); await _context.SaveChangesAsync(); } catch (Exception e) { return(false); } return(true); }