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); }
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); }