public static CitizenExportDto FromEntity(CitizenEntity entity) { if (entity == null) { return(null); } return(new CitizenExportDto { FirstName = entity.first_name, LastName = entity.last_name, Patronymic = entity.patronymic, Inn = entity.inn, Snils = entity.snils, BirthDate = entity.birth_date?.ToString(EXPORT_DATETIME_FORMAT), DeathDate = entity.death_date?.ToString(EXPORT_DATETIME_FORMAT) }); }
public static CitizenDto FromEntity(CitizenEntity entity) { if (entity == null) { return(null); } return(new CitizenDto { Id = entity.id, Cdate = entity.cdate, Udate = entity.udate, FirstName = entity.first_name, LastName = entity.last_name, Patronymic = entity.patronymic, Inn = entity.inn, Snils = entity.snils, BirthDate = entity.birth_date, DeathDate = entity.death_date }); }