public void Register(TypeAdapterConfig config) { config.NewConfig <Entity.Project, Model.ProjectModel>() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.ProjectNumber, src => src.ProjectNumber) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.ReportedFiscalYear, src => src.ReportedFiscalYear) .Map(dest => dest.ActualFiscalYear, src => src.ActualFiscalYear) .Map(dest => dest.WorkflowCode, src => src.Workflow == null ? null : src.Workflow.Code) .Map(dest => dest.StatusId, src => src.StatusId) .Map(dest => dest.StatusCode, src => src.Status == null ? null : src.Status.Code) .Map(dest => dest.Status, src => src.Status == null ? null : src.Status.Name) .Map(dest => dest.StatusRoute, src => src.Status == null ? null : src.Status.Route) .Map(dest => dest.TierLevelId, src => src.TierLevelId) .Map(dest => dest.TierLevel, src => src.TierLevel == null ? null : src.TierLevel.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.Note, src => src.GetNoteText(Entity.NoteTypes.General)) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Agency, src => AgencyConverter.ConvertAgency(src.Agency)) .Map(dest => dest.SubAgency, src => AgencyConverter.ConvertSubAgency(src.Agency)) .Map(dest => dest.NetBook, src => src.NetBook) .Map(dest => dest.Market, src => src.Market) .Map(dest => dest.Assessed, src => src.Assessed) .Map(dest => dest.Appraised, src => src.Appraised) .Map(dest => dest.Properties, src => src.Properties) .Map(dest => dest.UpdatedOn, src => src.UpdatedOn) .Map(dest => dest.UpdatedBy, src => src.UpdatedById != null ? src.UpdatedBy.DisplayName : null) .Map(dest => dest.CreatedOn, src => src.CreatedOn) .Map(dest => dest.CreatedBy, src => src.CreatedById != null ? src.CreatedBy.DisplayName : null) .Inherits <Entity.BaseEntity, Api.Models.BaseModel>(); }
public void Register(TypeAdapterConfig config) { config.NewConfig <Entity.Building, Model.BuildingModel>() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.ParcelId, src => src.ParcelId) .Map(dest => dest.LocalId, src => src.LocalId) .Map(dest => dest.ProjectNumber, src => src.ProjectNumber) .Map(dest => dest.ClassificationId, src => src.ClassificationId) .Map(dest => dest.Classification, src => src.Classification.Name) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Agency, src => AgencyConverter.ConvertAgency(src.Agency)) .Map(dest => dest.SubAgency, src => AgencyConverter.ConvertSubAgency(src.Agency)) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.Latitude, src => src.Latitude) .Map(dest => dest.Longitude, src => src.Longitude) .Map(dest => dest.Address, src => src.Address) .Map(dest => dest.BuildingConstructionTypeId, src => src.BuildingConstructionTypeId) .Map(dest => dest.BuildingConstructionType, src => src.BuildingConstructionType == null ? null : src.BuildingConstructionType.Name) .Map(dest => dest.BuildingOccupantTypeId, src => src.BuildingOccupantTypeId) .Map(dest => dest.BuildingOccupantType, src => src.BuildingOccupantType == null ? null : src.BuildingOccupantType.Name) .Map(dest => dest.BuildingPredominateUseId, src => src.BuildingPredominateUseId) .Map(dest => dest.BuildingPredominateUse, src => src.BuildingPredominateUse == null ? null : src.BuildingPredominateUse.Name) .Map(dest => dest.BuildingTenancy, src => src.BuildingTenancy) .Map(dest => dest.BuildingFloorCount, src => src.BuildingFloorCount) .Map(dest => dest.LeaseExpiry, src => src.LeaseExpiry) .Map(dest => dest.OccupantName, src => src.OccupantName) .Map(dest => dest.RentableArea, src => src.RentableArea) .Map(dest => dest.IsSensitive, src => src.IsSensitive) .Map(dest => dest.Evaluations, src => src.Evaluations) .Map(dest => dest.Fiscals, src => src.Fiscals) .Inherits <Entity.BaseEntity, Models.BaseModel>(); config.NewConfig <Model.BuildingModel, Entity.Building>() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.ParcelId, src => src.ParcelId) .Map(dest => dest.LocalId, src => src.LocalId) .Map(dest => dest.ProjectNumber, src => src.ProjectNumber) .Map(dest => dest.ClassificationId, src => src.ClassificationId) .Map(dest => dest.Classification, src => src.Classification) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.Latitude, src => src.Latitude) .Map(dest => dest.Longitude, src => src.Longitude) .Map(dest => dest.AddressId, src => src.Address == null ? 0 : src.Address.Id) .Map(dest => dest.Address, src => src.Address) .Map(dest => dest.BuildingConstructionTypeId, src => src.BuildingConstructionTypeId) .Map(dest => dest.BuildingOccupantTypeId, src => src.BuildingOccupantTypeId) .Map(dest => dest.BuildingPredominateUseId, src => src.BuildingPredominateUseId) .Map(dest => dest.BuildingTenancy, src => src.BuildingTenancy) .Map(dest => dest.BuildingFloorCount, src => src.BuildingFloorCount) .Map(dest => dest.LeaseExpiry, src => src.LeaseExpiry) .Map(dest => dest.OccupantName, src => src.OccupantName) .Map(dest => dest.RentableArea, src => src.RentableArea) .Map(dest => dest.IsSensitive, src => src.IsSensitive) .Map(dest => dest.Evaluations, src => src.Evaluations) .Map(dest => dest.Fiscals, src => src.Fiscals) .Inherits <Models.BaseModel, Entity.BaseEntity>(); }
public void Register(TypeAdapterConfig config) { config.NewConfig <Entity.Parcel, Model.ParcelModel>() .IgnoreNonMapped(true) .EnableNonPublicMembers(true) .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.PID, src => src.ParcelIdentity) .Map(dest => dest.PIN, src => src.PIN) .Map(dest => dest.ProjectNumber, src => src.ProjectNumber) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.ClassificationId, src => src.ClassificationId) .Map(dest => dest.Classification, src => src.Classification.Name) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Agency, src => AgencyConverter.ConvertAgency(src.Agency)) .Map(dest => dest.SubAgency, src => AgencyConverter.ConvertSubAgency(src.Agency)) .Map(dest => dest.Latitude, src => src.Latitude) .Map(dest => dest.Longitude, src => src.Longitude) .Map(dest => dest.Address, src => src.Address) .Map(dest => dest.LandArea, src => src.LandArea) .Map(dest => dest.LandLegalDescription, src => src.LandLegalDescription) .Map(dest => dest.Municipality, src => src.Municipality) .Map(dest => dest.Zoning, src => src.Zoning) .Map(dest => dest.ZoningPotential, src => src.ZoningPotential) .Map(dest => dest.IsSensitive, src => src.IsSensitive) .Map(dest => dest.IsVisibleToOtherAgencies, src => src.IsVisibleToOtherAgencies) .Map(dest => dest.Buildings, src => src.Buildings) .Map(dest => dest.Evaluations, src => src.Evaluations) .Map(dest => dest.Fiscals, src => src.Fiscals) .Inherits <Entity.BaseEntity, Models.BaseModel>(); config.NewConfig <Model.ParcelModel, Entity.Parcel>() .IgnoreNonMapped(true) .EnableNonPublicMembers(true) .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.PID, src => ParcelConverter.ConvertPID(src.PID)) .Map(dest => dest.PIN, src => src.PIN) .Map(dest => dest.ProjectNumber, src => src.ProjectNumber == "" ? null : src.ProjectNumber) .Map(dest => dest.ClassificationId, src => src.ClassificationId) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Latitude, src => src.Latitude) .Map(dest => dest.Longitude, src => src.Longitude) .Map(dest => dest.AddressId, src => src.Address == null ? 0 : src.Address.Id) .Map(dest => dest.Address, src => src.Address) .Map(dest => dest.LandArea, src => src.LandArea) .Map(dest => dest.LandLegalDescription, src => src.LandLegalDescription) .Map(dest => dest.Municipality, src => src.Municipality) .Map(dest => dest.Zoning, src => src.Zoning) .Map(dest => dest.ZoningPotential, src => src.ZoningPotential) .Map(dest => dest.IsSensitive, src => src.IsSensitive) .Map(dest => dest.IsVisibleToOtherAgencies, src => src.IsVisibleToOtherAgencies) .Map(dest => dest.Buildings, src => src.Buildings) .Map(dest => dest.Evaluations, src => src.Evaluations) .Map(dest => dest.Fiscals, src => src.Fiscals) .Inherits <Models.BaseModel, Entity.BaseEntity>(); }
public void Register(TypeAdapterConfig config) { config.NewConfig <Entity.Building, Model.BuildingModel>() .IgnoreNonMapped(true) .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Agency, src => AgencyConverter.ConvertAgency(src.Agency)) .Map(dest => dest.SubAgency, src => AgencyConverter.ConvertSubAgency(src.Agency)) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.ParcelId, src => src.GetParcelId()) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.Latitude, src => src.Location.Y) .Map(dest => dest.Longitude, src => src.Location.X) .Map(dest => dest.Address, src => src.Address) .Map(dest => dest.BuildingConstructionTypeId, src => src.BuildingConstructionTypeId) .Map(dest => dest.BuildingConstructionType, src => src.GetConstructionType()) .Map(dest => dest.BuildingOccupantTypeId, src => src.BuildingOccupantTypeId) .Map(dest => dest.BuildingOccupantType, src => src.GetOccupantType()) .Map(dest => dest.BuildingPredominateUseId, src => src.BuildingPredominateUseId) .Map(dest => dest.BuildingPredominateUse, src => src.GetPredominateUse()) .Map(dest => dest.BuildingTenancy, src => src.BuildingTenancy) .Map(dest => dest.BuildingFloorCount, src => src.BuildingFloorCount) .Map(dest => dest.LeaseExpiry, src => src.LeaseExpiry) .Map(dest => dest.OccupantName, src => src.OccupantName) .Map(dest => dest.RentableArea, src => src.RentableArea) .Map(dest => dest.TotalArea, src => src.TotalArea) .Map(dest => dest.IsSensitive, src => src.IsSensitive) .Map(dest => dest.Evaluations, src => src.Evaluations) .Map(dest => dest.Fiscals, src => src.Fiscals) .Inherits <Entity.BaseEntity, Api.Models.BaseModel>(); config.NewConfig <Model.BuildingModel, Entity.Building>() .IgnoreNonMapped(true) .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.Location, src => src) .Map(dest => dest.AddressId, src => src.Address == null ? 0 : src.Address.Id) .Map(dest => dest.Address, src => src.Address) .Map(dest => dest.BuildingConstructionTypeId, src => src.BuildingConstructionTypeId) .Map(dest => dest.BuildingOccupantTypeId, src => src.BuildingOccupantTypeId) .Map(dest => dest.BuildingPredominateUseId, src => src.BuildingPredominateUseId) .Map(dest => dest.BuildingTenancy, src => src.BuildingTenancy) .Map(dest => dest.BuildingFloorCount, src => src.BuildingFloorCount) .Map(dest => dest.LeaseExpiry, src => src.LeaseExpiry) .Map(dest => dest.OccupantName, src => src.OccupantName) .Map(dest => dest.RentableArea, src => src.RentableArea) .Map(dest => dest.TotalArea, src => src.TotalArea) .Map(dest => dest.IsSensitive, src => src.IsSensitive) .Map(dest => dest.Evaluations, src => src.Evaluations) .Map(dest => dest.Fiscals, src => src.Fiscals) .Inherits <Api.Models.BaseModel, Entity.BaseEntity>(); config.NewConfig <Model.BuildingModel, NetTopologySuite.Geometries.Point>() .ConstructUsing(src => Dal.Helpers.GeometryHelper.CreatePoint(src.Longitude, src.Latitude)); }
public void Register(TypeAdapterConfig config) { config.NewConfig <Entity.Parcel, Model.ParcelModel>() .EnableNonPublicMembers(true) .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.PID, src => src.ParcelIdentity) .Map(dest => dest.PIN, src => src.PIN) .Map(dest => dest.ProjectNumbers, src => JsonSerializer.Deserialize <IEnumerable <string> >(src.ProjectNumbers ?? "[]", _serializerOptions)) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.ClassificationId, src => src.ClassificationId) .Map(dest => dest.Classification, src => src.Classification.Name) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Agency, src => AgencyConverter.ConvertAgency(src.Agency)) .Map(dest => dest.SubAgency, src => AgencyConverter.ConvertSubAgency(src.Agency)) .Map(dest => dest.Latitude, src => src.Location.Y) .Map(dest => dest.Longitude, src => src.Location.X) .Map(dest => dest.Address, src => src.Address) .Map(dest => dest.LandArea, src => src.LandArea) .Map(dest => dest.LandLegalDescription, src => src.LandLegalDescription) .Map(dest => dest.Zoning, src => src.Zoning) .Map(dest => dest.ZoningPotential, src => src.ZoningPotential) .Map(dest => dest.IsSensitive, src => src.IsSensitive) .Map(dest => dest.IsVisibleToOtherAgencies, src => src.IsVisibleToOtherAgencies) .Map(dest => dest.Buildings, src => src.Buildings) .Map(dest => dest.Evaluations, src => src.Evaluations) .Map(dest => dest.Fiscals, src => src.Fiscals) .Inherits <Entity.BaseEntity, Models.BaseModel>(); config.NewConfig <Model.ParcelModel, Entity.Parcel>() .EnableNonPublicMembers(true) .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.PID, src => ParcelConverter.ConvertPID(src.PID)) .Map(dest => dest.PIN, src => src.PIN) .Map(dest => dest.ProjectNumbers, src => JsonSerializer.Serialize <IEnumerable <string> >(src.ProjectNumbers ?? Enumerable.Empty <string>(), _serializerOptions)) .Map(dest => dest.ClassificationId, src => src.ClassificationId) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Location, src => src) .Map(dest => dest.AddressId, src => src.Address == null ? 0 : src.Address.Id) .Map(dest => dest.Address, src => src.Address) .Map(dest => dest.LandArea, src => src.LandArea) .Map(dest => dest.LandLegalDescription, src => src.LandLegalDescription) .Map(dest => dest.Zoning, src => src.Zoning) .Map(dest => dest.ZoningPotential, src => src.ZoningPotential) .Map(dest => dest.IsSensitive, src => src.IsSensitive) .Map(dest => dest.IsVisibleToOtherAgencies, src => src.IsVisibleToOtherAgencies) .Map(dest => dest.Buildings, src => src.Buildings) .Map(dest => dest.Evaluations, src => src.Evaluations) .Map(dest => dest.Fiscals, src => src.Fiscals) .Inherits <Models.BaseModel, Entity.BaseEntity>(); config.NewConfig <Model.ParcelModel, NetTopologySuite.Geometries.Point>() .ConstructUsing(src => Dal.Helpers.GeometryHelper.CreatePoint(src.Longitude, src.Latitude)); }
public void Register(TypeAdapterConfig config) { config.NewConfig <Entity.Project, Model.ProjectModel>() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.ProjectNumber, src => src.ProjectNumber) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.WorkflowCode, src => src.Workflow.Code) .Map(dest => dest.Manager, src => src.Manager) .Map(dest => dest.ReportedFiscalYear, src => src.ReportedFiscalYear) .Map(dest => dest.ActualFiscalYear, src => src.ActualFiscalYear) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Agency, src => src.Agency.Name) .Map(dest => dest.AgencyCode, src => src.Agency.Code) .Map(dest => dest.SubAgency, src => AgencyConverter.ConvertAgency(src.Agency)) .Map(dest => dest.SubAgencyCode, src => AgencyConverter.ConvertSubAgency(src.Agency)) .Map(dest => dest.StatusId, src => src.StatusId) .Map(dest => dest.Status, src => src.Status.Name) .Map(dest => dest.StatusCode, src => src.Status.Code) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.Note, src => src.Note) .Map(dest => dest.TierLevelId, src => src.TierLevelId) .Map(dest => dest.TierLevel, src => src.TierLevel.Name) .Map(dest => dest.PublicNote, src => src.PublicNote) .Map(dest => dest.PrivateNote, src => src.PrivateNote) .Map(dest => dest.AppraisedNote, src => src.AppraisedNote) .Map(dest => dest.Metadata, src => src.Metadata) .Map(dest => dest.SubmittedOn, src => src.SubmittedOn) .Map(dest => dest.ApprovedOn, src => src.ApprovedOn) .Map(dest => dest.InitialNotificationSentOn, src => src.InitialNotificationSentOn) .Map(dest => dest.ThirtyDayNotificationSentOn, src => src.ThirtyDayNotificationSentOn) .Map(dest => dest.SixtyDayNotificationSentOn, src => src.SixtyDayNotificationSentOn) .Map(dest => dest.NinetyDayNotificationSentOn, src => src.NinetyDayNotificationSentOn) .Map(dest => dest.OnHoldNotificationSentOn, src => src.OnHoldNotificationSentOn) .Map(dest => dest.TransferredWithinGreOn, src => src.TransferredWithinGreOn) .Map(dest => dest.ClearanceNotificationSentOn, src => src.ClearanceNotificationSentOn) .Map(dest => dest.DeniedOn, src => src.DeniedOn) .Map(dest => dest.CancelledOn, src => src.CancelledOn) .Map(dest => dest.MarketedOn, src => src.MarketedOn) .Map(dest => dest.CompletedOn, src => src.CompletedOn) .Map(dest => dest.ExemptionRequested, src => src.ExemptionRequested) .Map(dest => dest.ExemptionRationale, src => src.ExemptionRationale) .Map(dest => dest.NetBook, src => src.NetBook) .Map(dest => dest.Estimated, src => src.Estimated) .Map(dest => dest.Assessed, src => src.Assessed) .Map(dest => dest.Appraised, src => src.Appraised) .Map(dest => dest.SalesCost, src => src.SalesCost) .Map(dest => dest.NetProceeds, src => src.NetProceeds) .Map(dest => dest.ProgramCost, src => src.ProgramCost) .Map(dest => dest.GainLoss, src => src.GainLoss) .Map(dest => dest.OcgFinancialStatement, src => src.OcgFinancialStatement) .Map(dest => dest.InterestComponent, src => src.InterestComponent) .Map(dest => dest.Notes, src => src.Notes) .Map(dest => dest.Responses, src => src.Responses) .BeforeMapping((src, dest) => JsonConvert.PopulateObject(src.Metadata ?? "{}", src)) .Inherits <Entity.BaseEntity, Api.Models.BaseModel>(); }
public void Register(TypeAdapterConfig config) { config.NewConfig <Entity.Parcel, Model.ParcelModel>() .IgnoreNonMapped(true) .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.PID, src => src.ParcelIdentity) .Map(dest => dest.PIN, src => src.PIN) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.ClassificationId, src => src.ClassificationId) .Map(dest => dest.Classification, src => src.Classification.Name) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Agency, src => AgencyConverter.ConvertAgency(src.Agency)) .Map(dest => dest.SubAgency, src => AgencyConverter.ConvertSubAgency(src.Agency)) .Map(dest => dest.Longitude, src => src.Location.X) .Map(dest => dest.Latitude, src => src.Location.Y) .Map(dest => dest.Address, src => src.Address) .Map(dest => dest.LandArea, src => src.LandArea) .Map(dest => dest.LandLegalDescription, src => src.LandLegalDescription) .Map(dest => dest.Zoning, src => src.Zoning) .Map(dest => dest.ZoningPotential, src => src.ZoningPotential) .Map(dest => dest.IsSensitive, src => src.IsSensitive) .Map(dest => dest.Buildings, src => src.Buildings) .Map(dest => dest.Evaluations, src => src.Evaluations) .Map(dest => dest.Fiscals, src => src.Fiscals) .Inherits <Entity.BaseEntity, Api.Models.BaseModel>(); config.NewConfig <Model.ParcelModel, Entity.Parcel>() .IgnoreNonMapped(true) .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.PID, src => ParcelConverter.ConvertPID(src.PID)) .Map(dest => dest.PIN, src => src.PIN) .Map(dest => dest.ClassificationId, src => src.ClassificationId) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Location, src => src) .Map(dest => dest.AddressId, src => src.Address == null ? 0 : src.Address.Id) .Map(dest => dest.Address, src => src.Address) .Map(dest => dest.LandArea, src => src.LandArea) .Map(dest => dest.LandLegalDescription, src => src.LandLegalDescription) .Map(dest => dest.Zoning, src => src.Zoning) .Map(dest => dest.ZoningPotential, src => src.ZoningPotential) .Map(dest => dest.IsSensitive, src => src.IsSensitive) .Map(dest => dest.Buildings, src => src.Buildings) .Map(dest => dest.Evaluations, src => src.Evaluations) .Map(dest => dest.Fiscals, src => src.Fiscals) .Inherits <Api.Models.BaseModel, Entity.BaseEntity>(); config.NewConfig <Model.ParcelModel, NetTopologySuite.Geometries.Point>() .ConstructUsing(src => Dal.Helpers.GeometryHelper.CreatePoint(src.Longitude, src.Latitude)); }
public void Register(TypeAdapterConfig config) { config.NewConfig <Entity.Property, Model.PropertyModel>() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.ClassificationId, src => src.ClassificationId) .Map(dest => dest.Classification, src => src.Classification.Name) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Agency, src => AgencyConverter.ConvertAgency(src.Agency)) .Map(dest => dest.SubAgency, src => AgencyConverter.ConvertSubAgency(src.Agency)) .Map(dest => dest.Latitude, src => src.Location.Y) .Map(dest => dest.Longitude, src => src.Location.X) .Map(dest => dest.Address, src => src.Address) .Map(dest => dest.IsSensitive, src => src.IsSensitive) .Inherits <Entity.BaseEntity, Api.Models.BaseModel>(); config.NewConfig <Entity.Parcel, Model.PropertyModel>() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.ClassificationId, src => src.ClassificationId) .Map(dest => dest.Classification, src => src.Classification.Name) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Agency, src => AgencyConverter.ConvertAgency(src.Agency)) .Map(dest => dest.SubAgency, src => AgencyConverter.ConvertSubAgency(src.Agency)) .Map(dest => dest.Latitude, src => src.Location.Y) .Map(dest => dest.Longitude, src => src.Location.X) .Map(dest => dest.Address, src => src.Address) .Map(dest => dest.IsSensitive, src => src.IsSensitive) .Inherits <Entity.BaseEntity, Api.Models.BaseModel>(); config.NewConfig <Entity.Building, Model.PropertyModel>() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.ClassificationId, src => src.ClassificationId) .Map(dest => dest.Classification, src => src.Classification.Name) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Agency, src => AgencyConverter.ConvertAgency(src.Agency)) .Map(dest => dest.SubAgency, src => AgencyConverter.ConvertSubAgency(src.Agency)) .Map(dest => dest.Latitude, src => src.Location.Y) .Map(dest => dest.Longitude, src => src.Location.X) .Map(dest => dest.Address, src => src.Address) .Map(dest => dest.IsSensitive, src => src.IsSensitive) .Inherits <Entity.BaseEntity, Api.Models.BaseModel>(); }
public void Register(TypeAdapterConfig config) { config.NewConfig <Entity.Building, Model.BuildingModel>() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.ParcelId, src => src.GetParcelId()) .Map(dest => dest.ProjectWorkflow, src => src.GetLatestWorkflowCode()) .Map(dest => dest.ProjectStatus, src => src.GetLatestProjectStatus()) .Map(dest => dest.ProjectNumbers, src => JsonSerializer.Deserialize <IEnumerable <string> >(src.ProjectNumbers ?? "[]", _serializerOptions)) .Map(dest => dest.ClassificationId, src => src.ClassificationId) .Map(dest => dest.Classification, src => src.Classification.Name) .Map(dest => dest.EncumbranceReason, src => src.EncumbranceReason) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Agency, src => AgencyConverter.ConvertAgency(src.Agency)) .Map(dest => dest.SubAgency, src => AgencyConverter.ConvertSubAgency(src.Agency)) .Map(dest => dest.AgencyFullName, src => AgencyConverter.ConvertAgencyFullName(src.Agency)) .Map(dest => dest.SubAgencyFullName, src => AgencyConverter.ConvertSubAgencyFullName(src.Agency)) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.Latitude, src => src.Location.Y) .Map(dest => dest.Longitude, src => src.Location.X) .Map(dest => dest.Address, src => src.Address) .Map(dest => dest.BuildingConstructionTypeId, src => src.BuildingConstructionTypeId) .Map(dest => dest.BuildingConstructionType, src => src.GetConstructionType()) .Map(dest => dest.BuildingOccupantTypeId, src => src.BuildingOccupantTypeId) .Map(dest => dest.BuildingOccupantType, src => src.GetOccupantType()) .Map(dest => dest.BuildingPredominateUseId, src => src.BuildingPredominateUseId) .Map(dest => dest.BuildingPredominateUse, src => src.GetPredominateUse()) .Map(dest => dest.BuildingTenancy, src => src.BuildingTenancy) .Map(dest => dest.BuildingTenancyUpdatedOn, src => src.BuildingTenancyUpdatedOn) .Map(dest => dest.BuildingFloorCount, src => src.BuildingFloorCount) .Map(dest => dest.LeaseExpiry, src => src.LeaseExpiry) .Map(dest => dest.OccupantName, src => src.OccupantName) .Map(dest => dest.RentableArea, src => src.RentableArea) .Map(dest => dest.TotalArea, src => src.TotalArea) .Map(dest => dest.IsSensitive, src => src.IsSensitive) .Map(dest => dest.Evaluations, src => src.Evaluations) .Map(dest => dest.Fiscals, src => src.Fiscals) .Map(dest => dest.Parcels, src => src.Parcels) .AfterMapping((src, dest) => { if (src.LeasedLandMetadata == null) { dest.LeasedLandMetadata = new List <Model.LeasedLandMetadataModel>(); return; } var metadata = JsonSerializer.Deserialize <IEnumerable <Entity.Models.LeasedLandMetadataModel> >(src.LeasedLandMetadata, _serializerOptions); dest.LeasedLandMetadata = metadata.Where(m => m != null).Select(l => new Model.LeasedLandMetadataModel { OwnershipNote = l.OwnershipNote, ParcelId = l.ParcelId, Type = (int)l.Type }); }) .Inherits <Entity.BaseEntity, BModel.BaseModel>(); config.NewConfig <Model.BuildingModel, Entity.Building>() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.Parcels, src => src.Parcels) .Map(dest => dest.ProjectNumbers, src => JsonSerializer.Serialize <IEnumerable <string> >(src.ProjectNumbers ?? Enumerable.Empty <string>(), _serializerOptions)) .Map(dest => dest.ClassificationId, src => src.ClassificationId) .Map(dest => dest.EncumbranceReason, src => src.EncumbranceReason) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.Location, src => src) .Map(dest => dest.AddressId, src => src.Address == null ? 0 : src.Address.Id) .Map(dest => dest.Address, src => src.Address) .Map(dest => dest.BuildingConstructionTypeId, src => src.BuildingConstructionTypeId) .Map(dest => dest.BuildingOccupantTypeId, src => src.BuildingOccupantTypeId) .Map(dest => dest.BuildingPredominateUseId, src => src.BuildingPredominateUseId) .Map(dest => dest.BuildingTenancy, src => src.BuildingTenancy) .Map(dest => dest.BuildingTenancyUpdatedOn, src => src.BuildingTenancyUpdatedOn) .Map(dest => dest.BuildingFloorCount, src => src.BuildingFloorCount) .Map(dest => dest.LeaseExpiry, src => src.LeaseExpiry) .Map(dest => dest.OccupantName, src => src.OccupantName) .Map(dest => dest.RentableArea, src => src.RentableArea) .Map(dest => dest.TotalArea, src => src.TotalArea) .Map(dest => dest.IsSensitive, src => src.IsSensitive) .Map(dest => dest.Evaluations, src => src.Evaluations) .Map(dest => dest.Fiscals, src => src.Fiscals) .AfterMapping((src, dest) => { var metadata = JsonSerializer.Serialize <IEnumerable <Model.LeasedLandMetadataModel> >(src.LeasedLandMetadata, _serializerOptions); dest.LeasedLandMetadata = metadata; }) .Inherits <BModel.BaseModel, Entity.BaseEntity>(); config.NewConfig <Model.BuildingModel, NetTopologySuite.Geometries.Point>() .ConstructUsing(src => Dal.Helpers.GeometryHelper.CreatePoint(src.Longitude, src.Latitude)); }
public void Register(TypeAdapterConfig config) { config.NewConfig <Entity.Project, Model.ProjectModel>() .Map(dest => dest.ProjectNumber, src => src.ProjectNumber) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.ReportedFiscalYear, src => src.ReportedFiscalYear) .Map(dest => dest.ActualFiscalYear, src => src.ActualFiscalYear) .Map(dest => dest.StatusCode, src => src.Status == null ? null : src.Status.Code) .Map(dest => dest.Status, src => src.Status == null ? null : src.Status.Name) .Map(dest => dest.Risk, src => src.Risk.Name) .Map(dest => dest.TierLevel, src => src.TierLevel == null ? null : src.TierLevel.Name) .Map(dest => dest.AgencyCode, src => AgencyConverter.ConvertAgency(src.Agency)) .Map(dest => dest.SubAgency, src => AgencyConverter.ConvertSubAgency(src.Agency)) .Map(dest => dest.UpdatedOn, src => src.UpdatedOn) .Map(dest => dest.UpdatedBy, src => src.UpdatedById != null ? src.UpdatedBy.DisplayName : null) .Map(dest => dest.CreatedOn, src => src.CreatedOn) .Map(dest => dest.CreatedBy, src => src.CreatedById != null ? src.CreatedBy.DisplayName : null) #region Notes .Map(dest => dest.Note, src => src.Note) .Map(dest => dest.PublicNote, src => src.PublicNote) .Map(dest => dest.PrivateNote, src => src.PrivateNote) .Map(dest => dest.AppraisedNote, src => src.AppraisedNote) #endregion #region Exemption .Map(dest => dest.ExemptionRequested, src => src.ExemptionRequested) .Map(dest => dest.ExemptionRationale, src => src.ExemptionRationale) #endregion #region Financial .Map(dest => dest.NetBook, src => src.NetBook) .Map(dest => dest.Estimated, src => src.Estimated) .Map(dest => dest.Assessed, src => src.Assessed) .Map(dest => dest.Appraised, src => src.Appraised) .Map(dest => dest.SalesCost, src => src.SalesCost) .Map(dest => dest.NetProceeds, src => src.NetProceeds) .Map(dest => dest.ProgramCost, src => src.ProgramCost) .Map(dest => dest.GainLoss, src => src.GainLoss) .Map(dest => dest.OcgFinancialStatement, src => src.OcgFinancialStatement) .Map(dest => dest.InterestComponent, src => src.InterestComponent) .Map(dest => dest.OfferAmount, src => src.OfferAmount) .Map(dest => dest.SaleWithLeaseInPlace, src => src.SaleWithLeaseInPlace) #endregion #region Dates .Map(dest => dest.SubmittedOn, src => src.SubmittedOn) .Map(dest => dest.ApprovedOn, src => src.ApprovedOn) .Map(dest => dest.InitialNotificationSentOn, src => src.InitialNotificationSentOn) .Map(dest => dest.ThirtyDayNotificationSentOn, src => src.ThirtyDayNotificationSentOn) .Map(dest => dest.SixtyDayNotificationSentOn, src => src.SixtyDayNotificationSentOn) .Map(dest => dest.NinetyDayNotificationSentOn, src => src.NinetyDayNotificationSentOn) .Map(dest => dest.OnHoldNotificationSentOn, src => src.OnHoldNotificationSentOn) .Map(dest => dest.TransferredWithinGreOn, src => src.TransferredWithinGreOn) .Map(dest => dest.ClearanceNotificationSentOn, src => src.ClearanceNotificationSentOn) .Map(dest => dest.DeniedOn, src => src.DeniedOn) .Map(dest => dest.CancelledOn, src => src.CancelledOn) .Map(dest => dest.DisposedOn, src => src.DisposedOn) .Map(dest => dest.CompletedOn, src => src.CompletedOn) #endregion #region SPL .Map(dest => dest.MarketedOn, src => src.MarketedOn) .Map(dest => dest.OffersNote, src => src.OffersNote) .Map(dest => dest.Purchaser, src => src.Purchaser) .Map(dest => dest.IsContractConditional, src => src.IsContractConditional); #endregion }
public void Register(TypeAdapterConfig config) { config.NewConfig <Entity.Building, Model.ParcelBuildingModel>() .EnableNonPublicMembers(true) .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.ParcelId, src => src.GetParcelId()) .Map(dest => dest.ProjectNumbers, src => JsonSerializer.Deserialize <IEnumerable <string> >(src.ProjectNumbers ?? "[]", _serializerOptions)) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Agency, src => AgencyConverter.ConvertAgency(src.Agency)) .Map(dest => dest.SubAgency, src => AgencyConverter.ConvertSubAgency(src.Agency)) .Map(dest => dest.Latitude, src => src.Location.Y) .Map(dest => dest.Longitude, src => src.Location.X) .Map(dest => dest.Address, src => src.Address) .Map(dest => dest.ClassificationId, src => src.ClassificationId) .Map(dest => dest.Classification, src => src.Classification.Name) .Map(dest => dest.BuildingConstructionTypeId, src => src.BuildingConstructionTypeId) .Map(dest => dest.BuildingConstructionType, src => src.GetConstructionType()) .Map(dest => dest.BuildingOccupantTypeId, src => src.BuildingOccupantTypeId) .Map(dest => dest.BuildingOccupantType, src => src.GetOccupantType()) .Map(dest => dest.BuildingPredominateUseId, src => src.BuildingPredominateUseId) .Map(dest => dest.BuildingPredominateUse, src => src.GetPredominateUse()) .Map(dest => dest.BuildingTenancy, src => src.BuildingTenancy) .Map(dest => dest.BuildingFloorCount, src => src.BuildingFloorCount) .Map(dest => dest.LeaseExpiry, src => src.LeaseExpiry) .Map(dest => dest.OccupantName, src => src.OccupantName) .Map(dest => dest.RentableArea, src => src.RentableArea) .Map(dest => dest.IsSensitive, src => src.IsSensitive) .Map(dest => dest.IsVisibleToOtherAgencies, src => src.IsVisibleToOtherAgencies) .Map(dest => dest.Evaluations, src => src.Evaluations) .Map(dest => dest.Fiscals, src => src.Fiscals) .Inherits <Entity.BaseEntity, BModel.BaseModel>(); config.NewConfig <Model.ParcelBuildingModel, Entity.Building>() .EnableNonPublicMembers(true) .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.Parcels, src => new List <Entity.ParcelBuilding>() { new Entity.ParcelBuilding() { ParcelId = src.ParcelId, BuildingId = src.Id } }) // TODO: Extend Mapster to handle this better. .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Location, src => src) .Map(dest => dest.AddressId, src => src.Address == null ? 0 : src.Address.Id) .Map(dest => dest.Address, src => src.Address) .Map(dest => dest.ClassificationId, src => src.ClassificationId) .Map(dest => dest.BuildingConstructionTypeId, src => src.BuildingConstructionTypeId) .Map(dest => dest.BuildingOccupantTypeId, src => src.BuildingOccupantTypeId) .Map(dest => dest.BuildingPredominateUseId, src => src.BuildingPredominateUseId) .Map(dest => dest.BuildingTenancy, src => src.BuildingTenancy) .Map(dest => dest.BuildingFloorCount, src => src.BuildingFloorCount) .Map(dest => dest.LeaseExpiry, src => src.LeaseExpiry) .Map(dest => dest.OccupantName, src => src.OccupantName) .Map(dest => dest.RentableArea, src => src.RentableArea) .Map(dest => dest.IsSensitive, src => src.IsSensitive) .Map(dest => dest.IsVisibleToOtherAgencies, src => src.IsVisibleToOtherAgencies) .Map(dest => dest.Evaluations, src => src.Evaluations) .Map(dest => dest.Fiscals, src => src.Fiscals) .Inherits <BModel.BaseModel, Entity.BaseEntity>(); config.NewConfig <Entity.ParcelBuilding, Model.ParcelBuildingModel>() .EnableNonPublicMembers(true) .Map(dest => dest.Id, src => src.BuildingId) .Map(dest => dest.ParcelId, src => src.ParcelId) .Map(dest => dest.ProjectNumbers, src => JsonSerializer.Deserialize <IEnumerable <string> >(src.Building.ProjectNumbers ?? "[]", _serializerOptions)) .Map(dest => dest.Name, src => src.Building.Name) .Map(dest => dest.Description, src => src.Building.Description) .Map(dest => dest.AgencyId, src => src.Building.AgencyId) .Map(dest => dest.Agency, src => AgencyConverter.ConvertAgency(src.Building.Agency)) .Map(dest => dest.SubAgency, src => AgencyConverter.ConvertSubAgency(src.Building.Agency)) .Map(dest => dest.Latitude, src => src.Building.Location.Y) .Map(dest => dest.Longitude, src => src.Building.Location.X) .Map(dest => dest.Address, src => src.Building.Address) .Map(dest => dest.ClassificationId, src => src.Building.ClassificationId) .Map(dest => dest.Classification, src => src.Building.Classification.Name) .Map(dest => dest.BuildingConstructionTypeId, src => src.Building.BuildingConstructionTypeId) .Map(dest => dest.BuildingConstructionType, src => src.Building.BuildingConstructionType == null ? null : src.Building.BuildingConstructionType.Name) .Map(dest => dest.BuildingOccupantTypeId, src => src.Building.BuildingOccupantTypeId) .Map(dest => dest.BuildingOccupantType, src => src.Building.BuildingOccupantType == null ? null : src.Building.BuildingOccupantType.Name) .Map(dest => dest.BuildingPredominateUseId, src => src.Building.BuildingPredominateUseId) .Map(dest => dest.BuildingPredominateUse, src => src.Building.BuildingPredominateUse == null ? null : src.Building.BuildingPredominateUse.Name) .Map(dest => dest.BuildingTenancy, src => src.Building.BuildingTenancy) .Map(dest => dest.BuildingFloorCount, src => src.Building.BuildingFloorCount) .Map(dest => dest.LeaseExpiry, src => src.Building.LeaseExpiry) .Map(dest => dest.OccupantName, src => src.Building.OccupantName) .Map(dest => dest.RentableArea, src => src.Building.RentableArea) .Map(dest => dest.IsSensitive, src => src.Building.IsSensitive) .Map(dest => dest.IsVisibleToOtherAgencies, src => src.Building.IsVisibleToOtherAgencies) .Map(dest => dest.Evaluations, src => src.Building.Evaluations) .Map(dest => dest.Fiscals, src => src.Building.Fiscals) .Inherits <Entity.BaseEntity, BModel.BaseModel>(); config.NewConfig <Model.ParcelBuildingModel, Entity.ParcelBuilding>() .EnableNonPublicMembers(true) .Map(dest => dest.BuildingId, src => src.Id) .Map(dest => dest.ParcelId, src => src.ParcelId) .Map(dest => dest.Building.Id, src => src.Id) .Map(dest => dest.Building.Name, src => src.Name) .Map(dest => dest.Building.Description, src => src.Description) .Map(dest => dest.Building.AgencyId, src => src.AgencyId) .Map(dest => dest.Building.Location, src => src) .Map(dest => dest.Building.AddressId, src => src.Address == null ? 0 : src.Address.Id) .Map(dest => dest.Building.Address, src => src.Address) .Map(dest => dest.Building.ClassificationId, src => src.ClassificationId) .Map(dest => dest.Building.BuildingConstructionTypeId, src => src.BuildingConstructionTypeId) .Map(dest => dest.Building.BuildingOccupantTypeId, src => src.BuildingOccupantTypeId) .Map(dest => dest.Building.BuildingPredominateUseId, src => src.BuildingPredominateUseId) .Map(dest => dest.Building.BuildingTenancy, src => src.BuildingTenancy) .Map(dest => dest.Building.BuildingFloorCount, src => src.BuildingFloorCount) .Map(dest => dest.Building.LeaseExpiry, src => src.LeaseExpiry) .Map(dest => dest.Building.OccupantName, src => src.OccupantName) .Map(dest => dest.Building.RentableArea, src => src.RentableArea) .Map(dest => dest.Building.IsSensitive, src => src.IsSensitive) .Map(dest => dest.Building.IsVisibleToOtherAgencies, src => src.IsVisibleToOtherAgencies) .Map(dest => dest.Building.Evaluations, src => src.Evaluations) .Map(dest => dest.Building.Fiscals, src => src.Fiscals) .Inherits <BModel.BaseModel, Entity.BaseEntity>(); config.NewConfig <Model.ParcelBuildingModel, NetTopologySuite.Geometries.Point>() .ConstructUsing(src => Dal.Helpers.GeometryHelper.CreatePoint(src.Longitude, src.Latitude)); }
public void Register(TypeAdapterConfig config) { config.NewConfig <Entity.Project, Model.ProjectModel>() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.ProjectNumber, src => src.ProjectNumber) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.ReportedFiscalYear, src => src.ReportedFiscalYear) .Map(dest => dest.ActualFiscalYear, src => src.ActualFiscalYear) .Map(dest => dest.WorkflowId, src => src.WorkflowId) .Map(dest => dest.WorkflowCode, src => src.Workflow.Code) .Map(dest => dest.StatusId, src => src.StatusId) .Map(dest => dest.StatusCode, src => src.Status.Code) .Map(dest => dest.Status, src => src.Status) .Map(dest => dest.RiskId, src => src.RiskId) .Map(dest => dest.Risk, src => src.Risk.Name) .Map(dest => dest.TierLevelId, src => src.TierLevelId) .Map(dest => dest.TierLevel, src => src.TierLevel == null ? null : src.TierLevel.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.Note, src => src.Note) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Purchaser, src => src.Purchaser) .Map(dest => dest.Manager, src => src.Manager) .Map(dest => dest.IsContractConditional, src => src.IsContractConditional) .Map(dest => dest.Agency, src => AgencyConverter.ConvertAgency(src.Agency)) .Map(dest => dest.SubAgency, src => AgencyConverter.ConvertSubAgency(src.Agency)) .Map(dest => dest.Properties, src => src.Properties) .Map(dest => dest.PublicNote, src => src.PublicNote) .Map(dest => dest.PrivateNote, src => src.PrivateNote) .Map(dest => dest.OffersNote, src => src.OffersNote) .Map(dest => dest.AppraisedNote, src => src.AppraisedNote) .Map(dest => dest.SubmittedOn, src => src.SubmittedOn) .Map(dest => dest.ApprovedOn, src => src.ApprovedOn) .Map(dest => dest.DeniedOn, src => src.DeniedOn) .Map(dest => dest.CancelledOn, src => src.CancelledOn) .Map(dest => dest.InitialNotificationSentOn, src => src.InitialNotificationSentOn) .Map(dest => dest.ThirtyDayNotificationSentOn, src => src.ThirtyDayNotificationSentOn) .Map(dest => dest.SixtyDayNotificationSentOn, src => src.SixtyDayNotificationSentOn) .Map(dest => dest.NinetyDayNotificationSentOn, src => src.NinetyDayNotificationSentOn) .Map(dest => dest.OnHoldNotificationSentOn, src => src.OnHoldNotificationSentOn) .Map(dest => dest.ClearanceNotificationSentOn, src => src.ClearanceNotificationSentOn) .Map(dest => dest.TransferredWithinGreOn, src => src.TransferredWithinGreOn) .Map(dest => dest.MarketedOn, src => src.MarketedOn) .Map(dest => dest.OfferAcceptedOn, src => src.OfferAcceptedOn) .Map(dest => dest.DisposedOn, src => src.DisposedOn) .Map(dest => dest.AssessedOn, src => src.AssessedOn) .Map(dest => dest.AdjustedOn, src => src.AdjustedOn) .Map(dest => dest.PreliminaryFormSignedOn, src => src.PreliminaryFormSignedOn) .Map(dest => dest.FinalFormSignedOn, src => src.FinalFormSignedOn) .Map(dest => dest.PriorYearAdjustmentOn, src => src.PriorYearAdjustmentOn) .Map(dest => dest.ExemptionRequested, src => src.ExemptionRequested) .Map(dest => dest.ExemptionRationale, src => src.ExemptionRationale) .Map(dest => dest.NetBook, src => src.NetBook) .Map(dest => dest.CloseOutNetbook, src => src.CloseOutNetbook) .Map(dest => dest.Estimated, src => src.Estimated) .Map(dest => dest.SalesCost, src => src.SalesCost) .Map(dest => dest.NetProceeds, src => src.NetProceeds) .Map(dest => dest.SalesProceeds, src => src.SalesProceeds) .Map(dest => dest.ProgramCost, src => src.ProgramCost) .Map(dest => dest.GainLoss, src => src.GainLoss) .Map(dest => dest.SppCapitalization, src => src.SppCapitalization) .Map(dest => dest.GainBeforeSpp, src => src.GainBeforeSpp) .Map(dest => dest.GainAfterSpp, src => src.GainAfterSpp) .Map(dest => dest.OcgFinancialStatement, src => src.OcgFinancialStatement) .Map(dest => dest.OfferAmount, src => src.OfferAmount) .Map(dest => dest.Assessed, src => src.Assessed) .Map(dest => dest.Appraised, src => src.Appraised) .Map(dest => dest.SaleWithLeaseInPlace, src => src.SaleWithLeaseInPlace) .Map(dest => dest.PriorYearAdjustment, src => src.PriorYearAdjustment) .Map(dest => dest.PriorYearAdjustmentAmount, src => src.PriorYearAdjustmentAmount) .Map(dest => dest.InterestComponent, src => src.InterestComponent) .Map(dest => dest.Realtor, src => src.Realtor) .Map(dest => dest.RealtorRate, src => src.RealtorRate) .Map(dest => dest.RealtorCommission, src => src.RealtorCommission) .Map(dest => dest.Remediation, src => src.Remediation) .Map(dest => dest.PlannedFutureUse, src => src.PlannedFutureUse) .Map(dest => dest.PreliminaryFormSignedBy, src => src.PreliminaryFormSignedBy) .Map(dest => dest.FinalFormSignedBy, src => src.FinalFormSignedBy) .Map(dest => dest.Tasks, src => src.Tasks) .Map(dest => dest.ProjectAgencyResponses, src => src.Responses) .Map(dest => dest.Notes, src => src.Notes) .BeforeMapping((src, dest) => JsonConvert.PopulateObject(src.Metadata ?? "{}", src)) //use the metadata object to populate fields not stored in DB. .Inherits <Entity.BaseEntity, Api.Models.BaseModel>(); config.NewConfig <Model.ProjectModel, Entity.Project>() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.ProjectNumber, src => src.ProjectNumber) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.ReportedFiscalYear, src => src.ReportedFiscalYear) .Map(dest => dest.ActualFiscalYear, src => src.ActualFiscalYear) .Map(dest => dest.WorkflowId, src => src.WorkflowId) .Map(dest => dest.StatusId, src => src.StatusId) .Map(dest => dest.RiskId, src => src.RiskId) .Map(dest => dest.TierLevelId, src => src.TierLevelId) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.Note, src => src.Note) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Purchaser, src => src.Purchaser) .Map(dest => dest.Manager, src => src.Manager) .Map(dest => dest.IsContractConditional, src => src.IsContractConditional) .Map(dest => dest.Properties, src => src.Properties) .Map(dest => dest.PublicNote, src => src.PublicNote) .Map(dest => dest.PrivateNote, src => src.PrivateNote) .Map(dest => dest.AppraisedNote, src => src.AppraisedNote) .Map(dest => dest.OffersNote, src => src.OffersNote) .Map(dest => dest.SubmittedOn, src => src.SubmittedOn) .Map(dest => dest.ApprovedOn, src => src.ApprovedOn) .Map(dest => dest.DeniedOn, src => src.DeniedOn) .Map(dest => dest.CancelledOn, src => src.CancelledOn) .Map(dest => dest.InitialNotificationSentOn, src => src.InitialNotificationSentOn) .Map(dest => dest.ThirtyDayNotificationSentOn, src => src.ThirtyDayNotificationSentOn) .Map(dest => dest.SixtyDayNotificationSentOn, src => src.SixtyDayNotificationSentOn) .Map(dest => dest.NinetyDayNotificationSentOn, src => src.NinetyDayNotificationSentOn) .Map(dest => dest.OnHoldNotificationSentOn, src => src.OnHoldNotificationSentOn) .Map(dest => dest.ClearanceNotificationSentOn, src => src.ClearanceNotificationSentOn) .Map(dest => dest.TransferredWithinGreOn, src => src.TransferredWithinGreOn) .Map(dest => dest.MarketedOn, src => src.MarketedOn) .Map(dest => dest.OfferAcceptedOn, src => src.OfferAcceptedOn) .Map(dest => dest.DisposedOn, src => src.DisposedOn) .Map(dest => dest.AssessedOn, src => src.AssessedOn) .Map(dest => dest.AdjustedOn, src => src.AdjustedOn) .Map(dest => dest.PreliminaryFormSignedOn, src => src.PreliminaryFormSignedOn) .Map(dest => dest.FinalFormSignedOn, src => src.FinalFormSignedOn) .Map(dest => dest.PriorYearAdjustmentOn, src => src.PriorYearAdjustmentOn) .Map(dest => dest.ExemptionRequested, src => src.ExemptionRequested) .Map(dest => dest.ExemptionRationale, src => src.ExemptionRationale) .Map(dest => dest.NetBook, src => src.NetBook) .Map(dest => dest.CloseOutNetbook, src => src.CloseOutNetbook) .Map(dest => dest.Estimated, src => src.Estimated) .Map(dest => dest.Assessed, src => src.Assessed) .Map(dest => dest.Appraised, src => src.Appraised) .Map(dest => dest.SalesCost, src => src.SalesCost) .Map(dest => dest.NetProceeds, src => src.NetProceeds) .Map(dest => dest.SalesProceeds, src => src.SalesProceeds) .Map(dest => dest.ProgramCost, src => src.ProgramCost) .Map(dest => dest.GainLoss, src => src.GainLoss) .Map(dest => dest.SppCapitalization, src => src.SppCapitalization) .Map(dest => dest.GainBeforeSpp, src => src.GainBeforeSpp) .Map(dest => dest.GainAfterSpp, src => src.GainAfterSpp) .Map(dest => dest.OcgFinancialStatement, src => src.OcgFinancialStatement) .Map(dest => dest.OfferAmount, src => src.OfferAmount) .Map(dest => dest.SaleWithLeaseInPlace, src => src.SaleWithLeaseInPlace) .Map(dest => dest.PriorYearAdjustment, src => src.PriorYearAdjustment) .Map(dest => dest.PriorYearAdjustmentAmount, src => src.PriorYearAdjustmentAmount) .Map(dest => dest.InterestComponent, src => src.InterestComponent) .Map(dest => dest.Realtor, src => src.Realtor) .Map(dest => dest.RealtorRate, src => src.RealtorRate) .Map(dest => dest.RealtorCommission, src => src.RealtorCommission) .Map(dest => dest.Remediation, src => src.Remediation) .Map(dest => dest.PlannedFutureUse, src => src.PlannedFutureUse) .Map(dest => dest.PreliminaryFormSignedBy, src => src.PreliminaryFormSignedBy) .Map(dest => dest.FinalFormSignedBy, src => src.FinalFormSignedBy) .Map(dest => dest.Tasks, src => src.Tasks) .Map(dest => dest.Responses, src => src.ProjectAgencyResponses) .Map(dest => dest.Notes, src => src.Notes) .AfterMapping((src, dest) => dest.Metadata = JsonConvert.SerializeObject(dest)) //Map all non-ignored fields into the metadata. .Inherits <Api.Models.BaseModel, Entity.BaseEntity>(); }
public void Register(TypeAdapterConfig config) { config.NewConfig <Entity.Project, Model.ProjectModel>() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.ProjectNumber, src => src.ProjectNumber) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.WorkflowCode, src => src.Workflow.Code) .Map(dest => dest.Manager, src => src.Manager) .Map(dest => dest.ReportedFiscalYear, src => src.ReportedFiscalYear) .Map(dest => dest.ActualFiscalYear, src => src.ActualFiscalYear) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Agency, src => src.Agency.Name) .Map(dest => dest.AgencyCode, src => src.Agency.Code) .Map(dest => dest.SubAgency, src => AgencyConverter.ConvertAgency(src.Agency)) .Map(dest => dest.SubAgencyCode, src => AgencyConverter.ConvertSubAgency(src.Agency)) .Map(dest => dest.StatusId, src => src.StatusId) .Map(dest => dest.Status, src => src.Status.Name) .Map(dest => dest.StatusCode, src => src.Status.Code) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.TierLevelId, src => src.TierLevelId) .Map(dest => dest.TierLevel, src => src.TierLevel.Name) .Map(dest => dest.Metadata, src => src.Metadata) .Map(dest => dest.SubmittedOn, src => src.SubmittedOn) .Map(dest => dest.ApprovedOn, src => src.ApprovedOn) .Map(dest => dest.DeniedOn, src => src.DeniedOn) .Map(dest => dest.CancelledOn, src => src.CancelledOn) .Map(dest => dest.CompletedOn, src => src.CompletedOn) .Map(dest => dest.NetBook, src => src.NetBook) .Map(dest => dest.Market, src => src.Market) .Map(dest => dest.Assessed, src => src.Assessed) .Map(dest => dest.Appraised, src => src.Appraised) .Map(dest => dest.Note, src => src.GetNoteText(Entity.NoteTypes.General)) .Map(dest => dest.PublicNote, src => src.GetNoteText(Entity.NoteTypes.Public)) .Map(dest => dest.PrivateNote, src => src.GetNoteText(Entity.NoteTypes.Private)) .Map(dest => dest.AppraisedNote, src => src.GetNoteText(Entity.NoteTypes.Appraisal)) .Map(dest => dest.ExemptionRationale, src => src.GetNoteText(Entity.NoteTypes.Exemption)) .Map(dest => dest.Notes, src => src.Notes) .Map(dest => dest.Responses, src => src.Responses) .AfterMapping((src, dest) => { var metadata = JsonSerializer.Deserialize <Entity.Models.DisposalProjectMetadata>(src.Metadata ?? "{}", _serializerOptions); dest.ExemptionRequested = metadata.ExemptionRequested; dest.SalesCost = metadata.SalesCost; dest.NetProceeds = metadata.NetProceeds; dest.ProgramCost = metadata.ProgramCost; dest.GainLoss = metadata.GainLoss; dest.OcgFinancialStatement = metadata.OcgFinancialStatement; dest.InterestComponent = metadata.InterestComponent; dest.InitialNotificationSentOn = metadata.InitialNotificationSentOn; dest.ThirtyDayNotificationSentOn = metadata.ThirtyDayNotificationSentOn; dest.SixtyDayNotificationSentOn = metadata.SixtyDayNotificationSentOn; dest.NinetyDayNotificationSentOn = metadata.NinetyDayNotificationSentOn; dest.OnHoldNotificationSentOn = metadata.OnHoldNotificationSentOn; dest.InterestedReceivedOn = metadata.InterestedReceivedOn; dest.ClearanceNotificationSentOn = metadata.ClearanceNotificationSentOn; dest.TransferredWithinGreOn = metadata.TransferredWithinGreOn; dest.MarketedOn = metadata.MarketedOn; }) .Inherits <Entity.BaseEntity, Api.Models.BaseModel>(); }
public void Register(TypeAdapterConfig config) { config.NewConfig <Entity.Project, Model.ProjectModel>() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.ProjectNumber, src => src.ProjectNumber) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.ReportedFiscalYear, src => src.ReportedFiscalYear) .Map(dest => dest.ActualFiscalYear, src => src.ActualFiscalYear) .Map(dest => dest.WorkflowId, src => src.WorkflowId) .Map(dest => dest.WorkflowCode, src => src.Workflow.Code) .Map(dest => dest.StatusId, src => src.StatusId) .Map(dest => dest.StatusCode, src => src.Status.Code) .Map(dest => dest.Status, src => src.Status) .Map(dest => dest.RiskId, src => src.RiskId) .Map(dest => dest.Risk, src => src.Risk.Name) .Map(dest => dest.TierLevelId, src => src.TierLevelId) .Map(dest => dest.TierLevel, src => src.TierLevel == null ? null : src.TierLevel.Name) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Manager, src => src.Manager) .Map(dest => dest.Agency, src => AgencyConverter.ConvertAgency(src.Agency)) .Map(dest => dest.SubAgency, src => AgencyConverter.ConvertSubAgency(src.Agency)) .Map(dest => dest.Properties, src => src.Properties) .Map(dest => dest.SubmittedOn, src => src.SubmittedOn) .Map(dest => dest.ApprovedOn, src => src.ApprovedOn) .Map(dest => dest.DeniedOn, src => src.DeniedOn) .Map(dest => dest.CancelledOn, src => src.CancelledOn) .Map(dest => dest.NetBook, src => src.NetBook) .Map(dest => dest.Market, src => src.Market) .Map(dest => dest.Assessed, src => src.Assessed) .Map(dest => dest.Appraised, src => src.Appraised) .Map(dest => dest.Tasks, src => src.Tasks) .Map(dest => dest.ProjectAgencyResponses, src => src.Responses) .Map(dest => dest.StatusHistory, src => src.StatusHistory) .Map(dest => dest.Note, src => src.GetNoteText(Entity.NoteTypes.General)) .Map(dest => dest.PublicNote, src => src.GetNoteText(Entity.NoteTypes.Public)) .Map(dest => dest.PrivateNote, src => src.GetNoteText(Entity.NoteTypes.Private)) .Map(dest => dest.OffersNote, src => src.GetNoteText(Entity.NoteTypes.Offer)) .Map(dest => dest.AppraisedNote, src => src.GetNoteText(Entity.NoteTypes.Appraisal)) .Map(dest => dest.ExemptionRationale, src => src.GetNoteText(Entity.NoteTypes.Exemption)) .Map(dest => dest.ReportingNote, src => src.GetNoteText(Entity.NoteTypes.Reporting)) .Map(dest => dest.RemovalFromSplRationale, src => src.GetNoteText(Entity.NoteTypes.SplRemoval)) .Map(dest => dest.InterestFromEnhancedReferralNote, src => src.GetNoteText(Entity.NoteTypes.AgencyInterest)) .Map(dest => dest.DocumentationNote, src => src.GetNoteText(Entity.NoteTypes.Documentation)) .Map(dest => dest.AdjustmentNote, src => src.GetNoteText(Entity.NoteTypes.Adjustment)) .Map(dest => dest.LoanTermsNote, src => src.GetNoteText(Entity.NoteTypes.LoanTerms)) .Map(dest => dest.CloseOutNote, src => src.GetNoteText(Entity.NoteTypes.CloseOut)) .Map(dest => dest.RemediationNote, src => src.GetNoteText(Entity.NoteTypes.Remediation)) .Map(dest => dest.ProgramCostNote, src => src.GetNoteText(Entity.NoteTypes.SplCost)) .Map(dest => dest.GainNote, src => src.GetNoteText(Entity.NoteTypes.SplGain)) .Map(dest => dest.SalesHistoryNote, src => src.GetNoteText(Entity.NoteTypes.SalesHistory)) .Map(dest => dest.Comments, src => src.GetNoteText(Entity.NoteTypes.Comments)) .Map(dest => dest.Notes, src => src.Notes) .AfterMapping((src, dest) => { var metadata = JsonSerializer.Deserialize <Entity.Models.DisposalProjectMetadata>(src.Metadata ?? "{}", _serializerOptions); dest.Purchaser = metadata.Purchaser; dest.InitialNotificationSentOn = metadata.InitialNotificationSentOn; dest.ThirtyDayNotificationSentOn = metadata.ThirtyDayNotificationSentOn; dest.SixtyDayNotificationSentOn = metadata.SixtyDayNotificationSentOn; dest.NinetyDayNotificationSentOn = metadata.NinetyDayNotificationSentOn; dest.OnHoldNotificationSentOn = metadata.OnHoldNotificationSentOn; dest.ClearanceNotificationSentOn = metadata.ClearanceNotificationSentOn; dest.TransferredWithinGreOn = metadata.TransferredWithinGreOn; dest.InterestedReceivedOn = metadata.InterestedReceivedOn; dest.RequestForSplReceivedOn = metadata.RequestForSplReceivedOn; dest.ApprovedForSplOn = metadata.ApprovedForSplOn; dest.MarketedOn = metadata.MarketedOn; dest.OfferAcceptedOn = metadata.OfferAcceptedOn; dest.AssessedOn = metadata.AssessedOn; dest.AdjustedOn = metadata.AdjustedOn; dest.PriorYearAdjustmentOn = metadata.PriorYearAdjustmentOn; dest.ExemptionRequested = metadata.ExemptionRequested; dest.ExemptionApprovedOn = metadata.ExemptionApprovedOn; dest.DisposedOn = metadata.DisposedOn; dest.SalesCost = metadata.SalesCost; dest.NetProceeds = metadata.NetProceeds; dest.ProgramCost = metadata.ProgramCost; dest.GainLoss = metadata.GainLoss; dest.SppCapitalization = metadata.SppCapitalization; dest.GainBeforeSpl = metadata.GainBeforeSpl; dest.OcgFinancialStatement = metadata.OcgFinancialStatement; dest.OfferAmount = metadata.OfferAmount; dest.SaleWithLeaseInPlace = metadata.SaleWithLeaseInPlace; dest.PriorYearAdjustment = metadata.PriorYearAdjustment; dest.PriorYearAdjustmentAmount = metadata.PriorYearAdjustmentAmount; dest.InterestComponent = metadata.InterestComponent; dest.Realtor = metadata.Realtor; dest.RealtorRate = metadata.RealtorRate; dest.RealtorCommission = metadata.RealtorCommission; dest.PlannedFutureUse = metadata.PlannedFutureUse; dest.PreliminaryFormSignedOn = metadata.PreliminaryFormSignedOn; dest.PreliminaryFormSignedBy = metadata.PreliminaryFormSignedBy; dest.FinalFormSignedOn = metadata.FinalFormSignedOn; dest.FinalFormSignedBy = metadata.FinalFormSignedBy; dest.RemovalFromSplRequestOn = metadata.RemovalFromSplRequestOn; dest.RemovalFromSplApprovedOn = metadata.RemovalFromSplApprovedOn; }) .Inherits <Entity.BaseEntity, Api.Models.BaseModel>(); config.NewConfig <Model.ProjectModel, Entity.Project>() .Map(dest => dest.Id, src => src.Id) .Map(dest => dest.ProjectNumber, src => src.ProjectNumber) .Map(dest => dest.Name, src => src.Name) .Map(dest => dest.ReportedFiscalYear, src => src.ReportedFiscalYear) .Map(dest => dest.ActualFiscalYear, src => src.ActualFiscalYear) .Map(dest => dest.WorkflowId, src => src.WorkflowId) .Map(dest => dest.StatusId, src => src.StatusId) .Map(dest => dest.RiskId, src => src.RiskId) .Map(dest => dest.TierLevelId, src => src.TierLevelId) .Map(dest => dest.Description, src => src.Description) .Map(dest => dest.AgencyId, src => src.AgencyId) .Map(dest => dest.Manager, src => src.Manager) .Map(dest => dest.Properties, src => src.Properties) .Map(dest => dest.SubmittedOn, src => src.SubmittedOn) .Map(dest => dest.ApprovedOn, src => src.ApprovedOn) .Map(dest => dest.DeniedOn, src => src.DeniedOn) .Map(dest => dest.CancelledOn, src => src.CancelledOn) .Map(dest => dest.NetBook, src => src.NetBook) .Map(dest => dest.Market, src => src.Market) .Map(dest => dest.Assessed, src => src.Assessed) .Map(dest => dest.Appraised, src => src.Appraised) .Map(dest => dest.Tasks, src => src.Tasks) .Map(dest => dest.Responses, src => src.ProjectAgencyResponses) .Map(dest => dest.Notes, src => src.Notes) .AfterMapping((src, dest) => { var metadata = new Entity.Models.DisposalProjectMetadata() { Purchaser = src.Purchaser, InitialNotificationSentOn = src.InitialNotificationSentOn, ThirtyDayNotificationSentOn = src.ThirtyDayNotificationSentOn, SixtyDayNotificationSentOn = src.SixtyDayNotificationSentOn, NinetyDayNotificationSentOn = src.NinetyDayNotificationSentOn, OnHoldNotificationSentOn = src.OnHoldNotificationSentOn, ClearanceNotificationSentOn = src.ClearanceNotificationSentOn, InterestedReceivedOn = src.InterestedReceivedOn, TransferredWithinGreOn = src.TransferredWithinGreOn, RequestForSplReceivedOn = src.RequestForSplReceivedOn, ApprovedForSplOn = src.ApprovedForSplOn, MarketedOn = src.MarketedOn, OfferAcceptedOn = src.OfferAcceptedOn, AssessedOn = src.AssessedOn, AdjustedOn = src.AdjustedOn, PriorYearAdjustmentOn = src.PriorYearAdjustmentOn, ExemptionRequested = src.ExemptionRequested, ExemptionApprovedOn = src.ExemptionApprovedOn, DisposedOn = src.DisposedOn, SalesCost = src.SalesCost, NetProceeds = src.NetProceeds, ProgramCost = src.ProgramCost, GainLoss = src.GainLoss, SppCapitalization = src.SppCapitalization, GainBeforeSpl = src.GainBeforeSpl, OcgFinancialStatement = src.OcgFinancialStatement, OfferAmount = src.OfferAmount, SaleWithLeaseInPlace = src.SaleWithLeaseInPlace, PriorYearAdjustment = src.PriorYearAdjustment, PriorYearAdjustmentAmount = src.PriorYearAdjustmentAmount, InterestComponent = src.InterestComponent, Realtor = src.Realtor, RealtorRate = src.RealtorRate, RealtorCommission = src.RealtorCommission, PlannedFutureUse = src.PlannedFutureUse, PreliminaryFormSignedOn = src.PreliminaryFormSignedOn, PreliminaryFormSignedBy = src.PreliminaryFormSignedBy, FinalFormSignedOn = src.FinalFormSignedOn, FinalFormSignedBy = src.FinalFormSignedBy, RemovalFromSplRequestOn = src.RemovalFromSplRequestOn, RemovalFromSplApprovedOn = src.RemovalFromSplApprovedOn }; dest.Metadata = JsonSerializer.Serialize(metadata, _serializerOptions); dest.AddOrUpdateNote(Entity.NoteTypes.General, src.Note ?? ""); dest.AddOrUpdateNote(Entity.NoteTypes.Public, src.PublicNote ?? ""); dest.AddOrUpdateNote(Entity.NoteTypes.Private, src.PrivateNote ?? ""); dest.AddOrUpdateNote(Entity.NoteTypes.Appraisal, src.AppraisedNote ?? ""); dest.AddOrUpdateNote(Entity.NoteTypes.Offer, src.OffersNote ?? ""); dest.AddOrUpdateNote(Entity.NoteTypes.Exemption, src.ExemptionRationale ?? ""); dest.AddOrUpdateNote(Entity.NoteTypes.Reporting, src.ReportingNote ?? ""); dest.AddOrUpdateNote(Entity.NoteTypes.SplRemoval, src.RemovalFromSplRationale ?? ""); dest.AddOrUpdateNote(Entity.NoteTypes.AgencyInterest, src.InterestFromEnhancedReferralNote ?? ""); dest.AddOrUpdateNote(Entity.NoteTypes.Documentation, src.DocumentationNote ?? ""); dest.AddOrUpdateNote(Entity.NoteTypes.Adjustment, src.AdjustmentNote ?? ""); dest.AddOrUpdateNote(Entity.NoteTypes.LoanTerms, src.LoanTermsNote ?? ""); dest.AddOrUpdateNote(Entity.NoteTypes.CloseOut, src.CloseOutNote ?? ""); dest.AddOrUpdateNote(Entity.NoteTypes.Remediation, src.RemediationNote ?? ""); dest.AddOrUpdateNote(Entity.NoteTypes.SplCost, src.ProgramCostNote ?? ""); dest.AddOrUpdateNote(Entity.NoteTypes.SplGain, src.GainNote ?? ""); dest.AddOrUpdateNote(Entity.NoteTypes.SalesHistory, src.SalesHistoryNote ?? ""); dest.AddOrUpdateNote(Entity.NoteTypes.Comments, src.Comments ?? ""); }) .Inherits <Api.Models.BaseModel, Entity.BaseEntity>(); }