WCF and Fluent NHibernate: How Can I Keep Clean Classes?

I am studying Nhibernate, jquery and WCF at the same time for my own project, and I was wondering why I did not have β€œpure” data classes.

From what I read, a very good point in the world of nhibernate is that my business class will not be associated with the framework. I will not have

<SaveInTable("Thingie")> _
Public Class Thingie
    <ColumnName("ThingieId")> _
    Public Property Id as Integer
    ' accessors
End Class

but rather something like

Public Class Thingie
Public Property Id as Integer
' etc

And then

Public Class ThingieMapping
Inherits ClassMap(Of Thingie)
' etc, omitted for brevity sake

, Thingies - jQuery, - WCF jquery ( , ), DataContract DataMember Thingie.
, - ASMX Thingie, .

, ; Thingie , .

, -, WCF ?

+3
1

DTO - ​​ DTO .

, , - DTO . (+ , ), AutoMapper.

DTO , , - NHibernate - , DTO - . , , .

+3

Source: https://habr.com/ru/post/1709105/


All Articles