I have a field on one of my classes that is not showing the data from the column when editing using locode. It is a string property and if I fill the text box with the data from the column it saves fine.
Version is 6.3.1
[Alias("MFGQty")]
[Schema("dbo")]
[NamedConnection("SPFMOnlineOrders")]
[EmitCSharp("[PropertyChanged.AddINotifyPropertyChangedInterface]")]
[EmitCSharp("[Validar.InjectValidation]")]
[System.ComponentModel.Description("MFGQty")]
[DataContract]
public class MFGQty
{
[DataMember(Order=1)]
[Display(AutoGenerateField = true, AutoGenerateFilter = false, ShortName= "GTIN", Order=1)]
public string GTIN { get; set;}
[DataMember(Order=2)]
[Display(AutoGenerateField = true, AutoGenerateFilter = false, ShortName= "Qty", Order=2)]
public int Qty { get; set;}
[DataMember(Order=3)]
[Display(AutoGenerateField = true, AutoGenerateFilter = false, ShortName= "CreatedAt", Order=3)]
public DateTime CreatedAt { get; set;}
[DataMember(Order=4)]
[Display(AutoGenerateField = true, AutoGenerateFilter = false, ShortName= "UpdatedAt", Order=4)]
public DateTime? UpdatedAt { get; set;}
[DataMember(Order = 5)]
[Display(AutoGenerateField = true, AutoGenerateFilter = false, ShortName = "UpdatedAt", Order = 4)]
[AutoIncrement]
public int Id { get; set; }
}
[Route("/mfgqties/{Id}", "GET")]
[Route("/mfgqties", "GET")]
[DataContract]
public class QueryMFGQties : QueryDb<MFGQty>, IReturn<QueryResponse<MFGQty>>, IGet
{
[DataMember(Order=1)]
public int? Id { get; set;}
}
[Route("/mfgqties/{Id}", "GET")]
[DataContract]
public class DeleteMFGQty : IReturn<IdResponse>, IDelete, IDeleteDb<MFGQty>
{
[DataMember(Order=1)]
public int Id { get; set; }
}
[Route("/mfgqties", "POST")]
[DataContract]
public class CreateMFGQty : IReturn<IdResponse>, IPost, ICreateDb<MFGQty>
{
[DataMember(Order=1)]
public string GTIN { get; set;}
[DataMember(Order=2)]
public int Qty { get; set;}
[DataMember(Order=3)]
public DateTime CreatedAt { get; set;}
[DataMember(Order=4)]
public DateTime? UpdatedAt { get; set;}
}
[Route("/mfgqties/{Id}", "PUT")]
[DataContract]
public class UpdateMFGQty : IReturn<IdResponse>, IPut, IUpdateDb<MFGQty>
{
[DataMember(Order=1)]
public string GTIN { get; set;}
[DataMember(Order=2)]
public int Qty { get; set;}
[DataMember(Order=3)]
public DateTime CreatedAt { get; set;}
[DataMember(Order=4)]
public DateTime? UpdatedAt { get; set;}
[DataMember(Order = 5)]
public int Id { get; set; }
}
Because the database is rather large I am using AutoRegister = false and I have a file in the Types folder of the ServiceModel project. Seems that this is related to this particular object as I don’t have this on other objects.
I am including the ddl for the table as well.
/****** Object: Table [dbo].[MFGQty] Script Date: 10/3/2022 3:29:50 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MFGQty](
[GTIN] varchar NOT NULL,
[Qty] [int] NOT NULL,
[CreatedAt] [datetime] NOT NULL,
[UpdatedAt] [datetime] NULL,
[Id] [int] IDENTITY(1,1) NOT NULL,
CONSTRAINT [PK_MFGQty_1] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MFGQty] ADD CONSTRAINT [DF_MFGQty_CreatedAt] DEFAULT (getdate()) FOR [CreatedAt]
GO