Пример #1
0
 public static StateDto Map(StateEntity entity)
 {
     return(new StateDto
     {
         Id = entity.Id,
         Name = entity.Name
     });
 }
Пример #2
0
        public static (StateTable, StateEntity) Map(StateFromTableDto dto)
        {
            var stateTable = new StateTable
            {
                TableId      = dto.TableId,
                IndexInTable = dto.Index,
                StateId      = dto.Id
            };

            var state = new StateEntity
            {
                Id   = dto.Id,
                Name = dto.Name
            };

            return(stateTable, state);
        }