質問

What I would like to do:

  1. Get DTO using projections
  2. In UI I edit this DTO object
  3. Save modified object

How can I save DTO object? Should I requery domain and merge it dto? Is there a possibility to specify projections for saving?

役に立ちましたか?

解決

Should I requery domain and merge it dto? 

Yes. That is pretty much what you'll need to do. NHibernate won't know what to do with your DTO, so none of the session methods to persist objects will work with your DTO.

Is there a possibility to specify projections for saving?

No. The only "projections for saving" are in ur NH mapping for the entity.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top