//public TEntity Add(TEntity tEntity) //{ // return dbSet.Add(tEntity); //} //public TEntity Remove(TEntity tEntity) //{ // return dbSet.Remove(tEntity); //} //public TEntity Update(TEntity tEntity) //{ // var updated = dbSet.Attach(tEntity); // Context.DbContext.Entry(tEntity).State=EntityState.Modified; // return updated; //} //public IQueryable<TEntity> GetAll(TEntity tEntity) //{ // return dbSet; //} //public TEntity Get(object key) //{ // return dbSet.Find(key); //} public void SaveChanges() { Context.SaveChanges(); }
//public GenericRepository<Tag> TagRepository //{ // get // { // if (this.tagRepository == null) // { // this.tagRepository = new GenericRepository<Tag>(context); // } // return tagRepository; // } //} public void Save() { context.SaveChanges(); }