Exemplo n.º 1
0
        public TModel BuildModel(string document, string address)
        {
            var contractResolver = GetContractResolver();
            var model            = _jsonDocumentSerializer.SetContractResolver(contractResolver)
                                   .Deserialize <TModel>(document);

            var id = GetId(address);

            if (id != null && model != null)
            {
                SetIdToModel(id, model);
            }

            return(model);
        }