public bool Add(EF.Favourite entity) { try { _dbContext.Favourites.Add(entity); _dbContext.SaveChanges(); return(true); } catch (Exception ex) { var message = ex.Message; return(false); } }
public async Task <bool> Add(EF.Favourite entity) { try { _dbContext.Favourites.Add(entity); await _dbContext.SaveChangesAsync(); return(true); } catch (Exception ex) { var message = ex.Message; return(false); } }