public Repository()
        {
            var contextManager = ServiceLocator.Current.GetInstance <IContextManager>();

            Db    = contextManager.GetContext();
            DbSet = Db.Set <TEntity>();
        }
 public TEntity Atualizar(TEntity obj)
 {
     Db.Set <TEntity>().AddOrUpdate(obj);
     return(obj);
 }