示例#1
0
        internal SingleTableEntityPersister GetPersister(IClassMetadata type)
        {
            var persister = type as SingleTableEntityPersister;

            if (persister == null)
            {
                throw new ODataException(String.Format(ErrorMessages.ODataService_UnsupportedPersister, type.GetType().FullName));
            }
            if (!persister.HasIdentifierProperty)
            {
                throw new ODataException(String.Format(ErrorMessages.ODataService_PersisterMustHaveIdentifierProperty, type.GetType().FullName));
            }

            return(persister);
        }
示例#2
0
        internal SingleTableEntityPersister GetPersister(IClassMetadata type)
        {
            var persister = type as SingleTableEntityPersister;

            if (persister == null)
                throw new ODataException(String.Format(ErrorMessages.ODataService_UnsupportedPersister, type.GetType().FullName));
            if (!persister.HasIdentifierProperty)
                throw new ODataException(String.Format(ErrorMessages.ODataService_PersisterMustHaveIdentifierProperty, type.GetType().FullName));

            return persister;
        }