Exemplo n.º 1
0
 public static Brand Execute(IRegisterNewBrandRequest request)
 {
     try
     {
         return(BrandFactory.MakeBrand(request));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Exemplo n.º 2
0
        public static async Task RegisterNewBrand(IRegisterNewBrandRequest request)
        {
            try
            {
                var brand = CreateNewBrand.Execute(request);
                await BrandEntity.ValidateNew(brand);

                await RegisterBrand.Execute(brand);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Exemplo n.º 3
0
 public static Brand MakeBrand(IRegisterNewBrandRequest request)
 {
     try
     {
         return(new Brand()
         {
             Name = request.Name,
             Abbreviation = request.Abbreviation,
             Cnpj = BrandEntity.NormilizeCnpj(request.Cnpj)
         });
     }
     catch (Exception e)
     {
         throw e;
     }
 }