public InstitutionResidentModel Map(InstitutionResident data) { var model = new InstitutionResidentModel { Id = data.Id, InstitutionId = data.InstitutionId, UserId = data.UserId }; if (data.User != null) { model.User = Map(data.User); } return(model); }
public InstitutionResident Map(InstitutionResidentModel model) { var data = new InstitutionResident { Id = model.Id, InstitutionId = model.InstitutionId, UserId = model.UserId, }; if (model.User != null) { data.User = Map(model.User); } return(data); }