Ejemplo n.º 1
0
        public void Supply()
        {
            Random  rdm            = new Random();
            Address _addressSupply = new Address("Rua testeSupply1", 25, "TesteTestetesteSupply1", "TesteTestetesteSupply1", "TesteTesttesteSupply1", "TesteTestetesteSupply1", "78005-210", null);
            var     supply         = new Supply("SuplyName", $"75.{rdm.Next(100, 999)}.813/0001-00", "30526425", "AgenteSup", "emailsuply", _addressSupply);

            _repositoryAddress.AddEntity(_addressSupply);
            // (_context as DbContextEF).SaveChanges();
            _repositorySupply.AddEntity(supply);
            // (_context as DbContextEF).SaveChanges();
            var resp          = _repositorySupply.GetSupplyCNPJ(supply.CNPJ);
            var SupplyAddress = _repositorySupply.GetSupplyWithAddress(supply.ID);
        }
Ejemplo n.º 2
0
 public ObjectRequest GetSupply(string cnpj) => new ObjectRequest()
 .CreateObjectRequest(_repositorySupply.GetSupplyCNPJ(cnpj), true);