类型安全的对象数据源 [英] Type safe objectdatasources
本文介绍了类型安全的对象数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么方法可以使 asp.net objectdatasources 类型安全.这意味着如果在重构期间参数或数据类型发生变化,我会收到编译时错误?
Is there any way to make asp.net objectdatasources to be type safe. Meaning I get a compile time error if parameters or datatypes change during refactoring?
有谁知道其他方法吗?或者可以推荐任何其他方式来做到这一点?我觉得手动装订很乏味.其他人在做什么?
Does anyone know any other method? Or can recommend any other way to do it? I find manual binding tedious. What is other people doing?
谢谢
推荐答案
不,所有绑定都是使用包含属性/列名称的字符串.
No, all binding is with strings holding property/column names.
也许考虑一个测试项目(单元测试).这将是我对最后一部分的回答.
Maybe consider a Test project (Unit testing). That would be my answer to the last part.
这篇关于类型安全的对象数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文