public bool Add(TEntity entity) { try { Context.Set <TEntity>().Add(entity); return(true); } catch (Exception) { return(false); } }
public void Add(TEntity entity) { try { Context.Set <TEntity>().Add(entity); } catch (Exception) { throw; } }
public bool Add(TEntity entity) { try { Context.Set <TEntity>().Add(entity); return(true); } catch (AggregateException) { return(false); } catch (NullReferenceException) { return(false); } catch (FormatException) { return(false); } }
public T Add(T entity) { _context.Set <T>().Add(entity); return(entity); }
public GeneralRepository(BDContext cafeContext) { _dbSet = cafeContext.Set <T>(); _dbContext = cafeContext; }
public void Add(TEntity entity) { _ctx.Set <TEntity>().Add(entity); }
public IQueryable <TEntity> GetAll() { return(ctx.Set <TEntity>()); }
public TEntity Get(int id) { return(Context.Set <TEntity>().Find(id)); }