private void createMasterUser()
        {
            using (Lib.Repositories.UserRepository rep = new UserRepository(null))
            {
                Lib.Entities.User masterUser = new User();
                masterUser.Login = "******";
                masterUser.Name = "testeMaster";
                masterUser.Password = "******";
                masterUser.UserType = (int)Lib.Enumerations.UserType.Master;
                masterUser.Email = "*****@*****.**";

                rep.createUserMaster(masterUser);

                _createdUser.Add(masterUser);
                activeUser = masterUser;
            }
        }
 public StateCityRepository(Lib.Entities.User activeUser)
 {
     this.ActiveUser = activeUser;
     context = new FDTContext();
 }
 public ResponseFormRepository(Lib.Entities.User activeUser)
 {
     this.ActiveUser = activeUser;
     context = new FDTContext();
 }
 public PeriodRepository(Lib.Entities.User activeUser)
 {
     this.ActiveUser = activeUser;
     context = new FDTContext();
 }
 /// <summary>
 /// Deleta uma entidade
 /// </summary>
 /// <param name="entity">Entidade</param>
 public void delete(User entity)
 {
     try
     {
         if (entity != null)
             delete(entity.Id);
     }
     catch (DbEntityValidationException ex)
     {
         //Adiciona na lista de erros os erros de DataAnnotation
         addErrorMessage(ex);
     }
     catch (Exception ex)
     {
         Log.ErrorLog.saveError("Lib.Repositories.UserRepository.delete", ex);
         throw new Exception("Lib.Repositories.UserRepository.delete - " + ex.Message, ex);
     }
 }