public T Update(T obj) { var entry = _protectosContext.Entry(obj); _dbSet.Attach(obj); entry.State = EntityState.Modified; return(obj); }