Domain Service,RIA Services使用的几个注意问题
2009-06-08 15:02
721 查看
1.在RIA Services自动生成代码时,自定义方法.
给方法加上PreserveName
2.生成的代码是不能重载的,需要使用不同的方法名,如:
3.RIA Service中的几个方法关键字
Insert
o “Insert”, “Add”, “Create” prefixes
o Method signature : void InsertX(T entity), where T is an entity Type
Update
o “Update”, “Change”, “Modify” prefixes
o Method signature : void UpdateX(T current, T original), where T is an entity Type
Delete
o “Delete”, “Remove” prefixes
o Method signature : void DeleteX(T entity), where T is an entity Type
Query
o “Get”, “Fetch”, “Find”, “Query”, “Retrieve”, “Select” prefixes
o Method signature returning IEnumerable<T> or IQueryable<T> where T is an entity Type, and taking zero or more parameters
Resolve
o “Resolve” prefix
o Method signature : bool ResolveX(T curr, T original, T store, bool isDelete) where T is an entity type
4.[ServiceOperation]属性
[ServiceOperation]
public String GetIp()
{
return "";
}
5.[Custom]属性
[Custom]
public void ApproveEmployee(Employee changedEmployee, ...)
给方法加上PreserveName
[Query(PreserveName=true)] public IQueryable<Personal> GetPersonalByPersonalId(Guid personalId)
2.生成的代码是不能重载的,需要使用不同的方法名,如:
public IQueryable<Personal> GetPersonals() 与 public IQueryable<Personal> GetPersonalsById(int id)
3.RIA Service中的几个方法关键字
Insert
o “Insert”, “Add”, “Create” prefixes
o Method signature : void InsertX(T entity), where T is an entity Type
Update
o “Update”, “Change”, “Modify” prefixes
o Method signature : void UpdateX(T current, T original), where T is an entity Type
Delete
o “Delete”, “Remove” prefixes
o Method signature : void DeleteX(T entity), where T is an entity Type
Query
o “Get”, “Fetch”, “Find”, “Query”, “Retrieve”, “Select” prefixes
o Method signature returning IEnumerable<T> or IQueryable<T> where T is an entity Type, and taking zero or more parameters
Resolve
o “Resolve” prefix
o Method signature : bool ResolveX(T curr, T original, T store, bool isDelete) where T is an entity type
4.[ServiceOperation]属性
[ServiceOperation]
public String GetIp()
{
return "";
}
5.[Custom]属性
[Custom]
public void ApproveEmployee(Employee changedEmployee, ...)
相关文章推荐
- 使用Entity Framework和WCF Ria Services开发SilverLight之7:多个Domain Service间共享Poco实体
- 使用Entity Framework和WCF Ria Services开发SilverLight之7:多个Domain Service间共享Poco实体
- Android中使用Service时需要注意的几个问题
- 使用Entity Framework和WCF Ria Services开发SilverLight之7:多个Domain Service间共享Poco实体
- SilverLight中使用WCF Ria出现的问题empty domain service class
- Mac下apache使用需要注意的几个问题
- 使用 linux的几个需要注意的问题(之二)
- 使用模板模板缓冲时需要注意的几个问题
- 使用OpenCV中应当注意的几个问题
- 使用EHCache需要注意的几个问题(转)
- 使用模板模板缓冲时需要注意的几个问题
- OpenGL使用模板模板缓冲时需要注意的几个问题 .
- 使用模板缓冲区时需要注意的几个问题
- 使用单例模式需要注意的几个问题
- 使用freertos V9.0.0需要注意的几个问题
- 使用Visual Basic访问数据库几个注意的问题
- windows NT 4.0 Domain升级到windows server 2008 R2需要注意的几个问题
- 使用Spring的Service注入Dao接口需要注意的细节问题
- 使用Spring的Service注入Dao接口需要注意的细节问题
- 关于Service中bindService注意的几个问题