手动在属性上添加[DataMember(Order = 18,EmitDefaultValue = false)] [英] Adding [DataMember(Order=18, EmitDefaultValue=false)] on properties manually

查看:281
本文介绍了手动在属性上添加[DataMember(Order = 18,EmitDefaultValue = false)]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我正在使用Linq to Sql类。令我恼火的是每次我对数据库进行更改并将表拖到我的dbml文件中时,我需要在我的类中为我的成员添加一些属性。

如[DataMember(Order = 18,EmitDefaultValue = false)]

有没有办法可以避免手动执行此操作?

Hi

I am using a Linq to Sql class. What annoys me is that every time I have changes to my database and I drag the tables into my dbml file I need to add some attributes to my members on my classes.

Like [DataMember(Order=18, EmitDefaultValue=false)]

Is there a way I can avoid doing this manually?

推荐答案

以下内容看起来应该有所帮助,因为您不必从dbml文件中删除表并再次将其拖动以更新架构:

http://www.huagati.com/dbmltools/

The following looks like it should help, because you won't have to remove the tables from the dbml files and drag them on again to update the schema:

http://www.huagati.com/dbmltools/

Joe


这篇关于手动在属性上添加[DataMember(Order = 18,EmitDefaultValue = false)]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆