문제

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