예제 #1
0
        public void IsValid()
        {
            if (Account.IsNull() || Account.Code.IsEmpty())
            {
                throw new ArgumentException("Código do usuário não informado");
            }

            if (Store.IsNull() || Store.Code.IsEmpty())
            {
                throw new ArgumentException("Codigo da loja não informado");
            }
        }
예제 #2
0
        public IEnumerable <DTO.ApplicationStore> Save(DTO.Store store)
        {
            if (store.IsNull())
            {
                throw new ArgumentException("Informe os dados da loja.");
            }

            var domainStore = new Store(store);

            domainStore.IsValid();

            Store newStore = Create(domainStore);

            return(newStore.ApplicationsStore.Select(a => new DTO.ApplicationStore(a)));
        }