Пример #1
0
            private void MapValue(QueryResult queryResult)
            {
                var writer = new ObjectGraphReaderWriter <TView>(_view);
                var value  = (object)queryResult.GetInt32(0);

                writer.Write(_primaryKeyIntersectedFields.RightPath, value);
            }
Пример #2
0
        private static void AttemptWriteToObject <TView, TData>(TView obj, TData data, EntityField <T> entityField,
                                                                IEntityView <TView> entityView)
            where TView : class
        {
            var intersectedFields = entityView.EntityToClassIntersection
                                    .IntersectedFields.FirstOrDefault(q => q.LeftField == entityField);

            if (intersectedFields == null)
            {
                return;
            }

            var writer = new ObjectGraphReaderWriter <TView>(obj);

            writer.Write(intersectedFields.RightPath, data);
        }