Esempio n. 1
0
        public BasketTargets.RootModel RecalculateBasketTargets(BasketTargets.RootModel model)
        {
            var deserializedModel = this.btDeserializer.DeserializeRoot(model);
            var ticket            = new CalculationTicket();
            var serializedModel   = this.btSerializer.SerializeRoot(deserializedModel, ticket);

            return(serializedModel);
        }
Esempio n. 2
0
        public IEnumerable <IssueModel> SaveBasketTargets(BasketTargets.RootModel model, string username)
        {
            var deserializedModel = this.btDeserializer.DeserializeRoot(model);
            var ticket            = new CalculationTicket();
            var issues            = this.facade.ApplyBpstModelIfValid(deserializedModel, username, ticket);
            var serializedIssues  = this.serializer.SerializeValidationIssues(issues);

            return(serializedIssues);
        }