public partial class HLGL_FORM_HLCXZLGJ_Request
: IReturn<List<HLGL_FORM_HLCXZLGJ_ViewModel>>
{
public virtual string zjid { get; set; }
public virtual string ksid { get; set; }
public virtual DateTime StartDate { get; set; }
public virtual DateTime EndDate { get; set; }
public virtual string XMND { get; set; }
}
public async Task<List<HLGL_FORM_HLCXZLGJ_ViewModel>> Any(HLGL_FORM_HLCXZLGJ_Request request)
{
var startDate = request.StartDate.Sql();
var endDate = request.EndDate.AddDays(1).Sql();
var sql = $@"... ";
if (request.StartDate == default)
{
logger.Info("StartDate is Default");
}
else
{
logger.Info("StartDate: " + request.StartDate.ToString());
}
if (request.EndDate == default)
{
logger.Info(" EndDate is Default");
}
else
{
logger.Info(" EndDate : " + request.EndDate.ToString() ");
}
Call the service, In the below, request.StartDate is default and the value is 0001/01/01 ,
But In the above code , the StartDate and EndDate Not equal default, the value is
0001/1/1 8:00:00 , why the value will change? I have try set ServiceStack.Text.JsConfig.SkipDateTimeConversion = true; , it not take effect
var Gateway = app.Gateway;
var request = new HLGL_FORM_HLCXZLGJ_Request
{
zjid = ZJID,
StartDate =default,
EndDate =default,
};
if(request.StartDate == default)
{
ShowMessage("default StartDate");
}
if (request.EndDate == default)
{
ShowMessage("default EndDate");
}
var list = Gateway.Send(request);