Пример #1
0
 public static Data.Entities.ResponsabilityType StoD(ResponsabilityType r)
 {
     return(new Data.Entities.ResponsabilityType
     {
         Id = r.Id,
         Title = r.Title,
         Desription = r.Desription
     });
 }
Пример #2
0
 public static Responsability DtoS(Data.Entities.Responsability responsability)
 {
     return(new Responsability
     {
         Id = responsability.Id,
         ResponsabilityTypeId = responsability.ResponsabilityTypeId,
         AuthorId = responsability.AuthorId,
         BookId = responsability.BookId,
         Author = Author.DtoS(responsability.Author),
         ResponsabilityType = ResponsabilityType.DtoS(responsability.ResponsabilityType),
         BookTitle = responsability.Book != null ? responsability.Book.Title : string.Empty
     });
 }