public static DbMapping GetDbMapping(DbContext context)
        {
            var contextType = context.GetType();
              if (_mappings.ContainsKey(contextType))
              {
            return _mappings[contextType];
              }

              var mapping = new DbMapping(context);
              _mappings[contextType] = mapping;
              return mapping;
        }
Esempio n. 2
0
        public static DbMapping GetDbMapping(DbContext context)
        {
            var contextType = context.GetType();

            if (_mappings.ContainsKey(contextType))
            {
                return(_mappings[contextType]);
            }

            var mapping = new DbMapping(context);

            _mappings[contextType] = mapping;
            return(mapping);
        }