开发者

ASP.NET MVC 2: cast not valid?

开发者 https://www.devze.com 2023-01-28 20:13 出处:网络
And here\'s my DataContext: [Function(Name = \"Customer.spSearchDeals\")] [ResultType(typeof(Filter))] [ResultType(开发者_Python百科typeof(Deal))]

ASP.NET MVC 2: cast not valid?

And here's my DataContext:

[Function(Name = "Customer.spSearchDeals")]
        [ResultType(typeof(Filter))]
        [ResultType(开发者_Python百科typeof(Deal))]
        public IMultipleResults SearchDeals(
            //[Parameter(Name = "ZipCode", DbType = "Char(5)")]
            //XElement xmlString
            )
        {
            var result = this.ExecuteMethodCall(this,
                ((MethodInfo)(MethodInfo.GetCurrentMethod()))
                //,xmlString
                );
            return (IMultipleResults)result.ReturnValue;
        }

What's the problem? What SHOULD the cast be?


The answer was quite odd...

In my model, I declared an "int" where the result was actually a "long"

0

精彩评论

暂无评论...
验证码 换一张
取 消