public static UnderTrack MapToDbModel(this UnderTrackDto underTrackDto) { var underTrack = new UnderTrack { CenterId = underTrackDto.CenterId, Name = underTrackDto.Name, CellNumber = underTrackDto.CellNumber, Imei = underTrackDto.Imei }; if (underTrackDto.Id.HasValue) { underTrack.Id = underTrackDto.Id.Value; } if (underTrackDto.CreationDate != null) { underTrack.CreationDate = underTrackDto.CreationDate.Value; } if (underTrackDto.UnderTrackTypeId != null) { underTrack.UnderTrackTypeId = underTrackDto.UnderTrackTypeId.Value; } return(underTrack); }
public void AddUnderTrack(UnderTrack underTrack) { AddEntity(underTrack); }