Files
DynamORM/Tester/RealTests/OddNullabeleProblem.cs

449 lines
15 KiB
C#

using DynamORM;
using DynamORM.Mapper;
using DynamORM.Objects;
using System;
using System.Collections.Generic;
using System.Text;
namespace Tester.RealTests
{
internal static class OddNullabeleProblem
{
public static void Test(DynamicDatabase db)
{
var ca = new mom_Contractors_Articles();
ca.mca_min_date_valid_out = 5;
ca.mca_mar_code = "342";
ca.mca_mar_name = "234";
ca.SetDynamicEntityState(DynamicEntityState.Existing);
ca.mca_min_date_valid_out = null;
ca.mca_mar_code = null;
ca.mca_mar_name = null;
var r = new DynamicRepositoryBase<mom_Contractors_Articles>(db);
r.Save(ca);
}
[Table(Name = "mom_Contractors_Articles")]
public class mom_Contractors_Articles : DynamicEntityBase
{
private System.Guid _mca_id;
[Column("mca_id", true, AllowNull = false)]
public virtual System.Guid mca_id
{
get { return _mca_id; }
set
{
if (_mca_id != value)
{
this.OnPropertyChanging("mca_id", _mca_id, value);
_mca_id = value;
}
}
}
private System.Nullable<System.Guid> _mca_mc_id;
[Column("mca_mc_id")]
public virtual System.Nullable<System.Guid> mca_mc_id
{
get { return _mca_mc_id; }
set
{
if (_mca_mc_id != value)
{
this.OnPropertyChanging("mca_mc_id", _mca_mc_id, value);
_mca_mc_id = value;
}
}
}
private System.Nullable<System.Guid> _mca_mar_id;
[Column("mca_mar_id")]
public virtual System.Nullable<System.Guid> mca_mar_id
{
get { return _mca_mar_id; }
set
{
if (_mca_mar_id != value)
{
this.OnPropertyChanging("mca_mar_id", _mca_mar_id, value);
_mca_mar_id = value;
}
}
}
private System.Nullable<System.Int32> _mca_min_date_valid_out;
[Column("mca_min_date_valid_out", AllowNull = true)]
public virtual System.Nullable<System.Int32> mca_min_date_valid_out
{
get { return _mca_min_date_valid_out; }
set
{
if (_mca_min_date_valid_out != value)
{
this.OnPropertyChanging("mca_min_date_valid_out", _mca_min_date_valid_out, value);
_mca_min_date_valid_out = value;
}
}
}
private System.Nullable<System.Int32> _mca_min_date_valid_in;
[Column("mca_min_date_valid_in")]
public virtual System.Nullable<System.Int32> mca_min_date_valid_in
{
get { return _mca_min_date_valid_in; }
set
{
if (_mca_min_date_valid_in != value)
{
this.OnPropertyChanging("mca_min_date_valid_in", _mca_min_date_valid_in, value);
_mca_min_date_valid_in = value;
}
}
}
private System.String _mca_mar_code;
[Column("mca_mar_code", AllowNull = true)]
public virtual System.String mca_mar_code
{
get { return _mca_mar_code; }
set
{
if (_mca_mar_code != value)
{
this.OnPropertyChanging("mca_mar_code", _mca_mar_code, value);
_mca_mar_code = value;
}
}
}
private System.String _mca_mar_name;
[Column("mca_mar_name", AllowNull = true)]
public virtual System.String mca_mar_name
{
get { return _mca_mar_name; }
set
{
if (_mca_mar_name != value)
{
this.OnPropertyChanging("mca_mar_name", _mca_mar_name, value);
_mca_mar_name = value;
}
}
}
private System.String _mca_gid;
[Column("mca_GID")]
public virtual System.String mca_GID
{
get { return _mca_gid; }
set
{
if (_mca_gid != value)
{
this.OnPropertyChanging("mca_GID", _mca_gid, value);
_mca_gid = value;
}
}
}
private System.Nullable<System.Decimal> _mca_percent_wz;
[Column("mca_percent_WZ")]
public virtual System.Nullable<System.Decimal> mca_percent_WZ
{
get { return _mca_percent_wz; }
set
{
if (_mca_percent_wz != value)
{
this.OnPropertyChanging("mca_percent_WZ", _mca_percent_wz, value);
_mca_percent_wz = value;
}
}
}
private System.Nullable<System.Decimal> _mca_percent_pz;
[Column("mca_percent_PZ")]
public virtual System.Nullable<System.Decimal> mca_percent_PZ
{
get { return _mca_percent_pz; }
set
{
if (_mca_percent_pz != value)
{
this.OnPropertyChanging("mca_percent_PZ", _mca_percent_pz, value);
_mca_percent_pz = value;
}
}
}
private System.Byte _mca_tss_ignore;
[Column("mca_tss_ignore", AllowNull = false)]
public virtual System.Byte mca_tss_ignore
{
get { return _mca_tss_ignore; }
set
{
if (_mca_tss_ignore != value)
{
this.OnPropertyChanging("mca_tss_ignore", _mca_tss_ignore, value);
_mca_tss_ignore = value;
}
}
}
private System.String _mca_mar_bar_code;
[Column("mca_mar_bar_code")]
public virtual System.String mca_mar_bar_code
{
get { return _mca_mar_bar_code; }
set
{
if (_mca_mar_bar_code != value)
{
this.OnPropertyChanging("mca_mar_bar_code", _mca_mar_bar_code, value);
_mca_mar_bar_code = value;
}
}
}
private System.Nullable<System.Guid> _mca_mus_id_modified;
[Column("mca_mus_id_modified")]
public virtual System.Nullable<System.Guid> mca_mus_id_modified
{
get { return _mca_mus_id_modified; }
set
{
if (_mca_mus_id_modified != value)
{
this.OnPropertyChanging("mca_mus_id_modified", _mca_mus_id_modified, value);
_mca_mus_id_modified = value;
}
}
}
private System.Nullable<System.DateTime> _mca_date_modified;
[Column("mca_date_modified")]
public virtual System.Nullable<System.DateTime> mca_date_modified
{
get { return _mca_date_modified; }
set
{
if (_mca_date_modified != value)
{
this.OnPropertyChanging("mca_date_modified", _mca_date_modified, value);
_mca_date_modified = value;
}
}
}
private System.String _mca_ean_label_unit;
[Column("mca_ean_label_unit")]
public virtual System.String mca_ean_label_unit
{
get { return _mca_ean_label_unit; }
set
{
if (_mca_ean_label_unit != value)
{
this.OnPropertyChanging("mca_ean_label_unit", _mca_ean_label_unit, value);
_mca_ean_label_unit = value;
}
}
}
private System.String _mca_ean_label_pckg;
[Column("mca_ean_label_pckg")]
public virtual System.String mca_ean_label_pckg
{
get { return _mca_ean_label_pckg; }
set
{
if (_mca_ean_label_pckg != value)
{
this.OnPropertyChanging("mca_ean_label_pckg", _mca_ean_label_pckg, value);
_mca_ean_label_pckg = value;
}
}
}
private System.Nullable<System.Decimal> _mca_price;
[Column("mca_price")]
public virtual System.Nullable<System.Decimal> mca_price
{
get { return _mca_price; }
set
{
if (_mca_price != value)
{
this.OnPropertyChanging("mca_price", _mca_price, value);
_mca_price = value;
}
}
}
private System.String _mca_currency_code;
[Column("mca_currency_code")]
public virtual System.String mca_currency_code
{
get { return _mca_currency_code; }
set
{
if (_mca_currency_code != value)
{
this.OnPropertyChanging("mca_currency_code", _mca_currency_code, value);
_mca_currency_code = value;
}
}
}
private System.Nullable<System.Int32> _mca_time_ahead;
[Column("mca_time_ahead")]
public virtual System.Nullable<System.Int32> mca_time_ahead
{
get { return _mca_time_ahead; }
set
{
if (_mca_time_ahead != value)
{
this.OnPropertyChanging("mca_time_ahead", _mca_time_ahead, value);
_mca_time_ahead = value;
}
}
}
private System.Nullable<System.Decimal> _mca_last_price;
[Column("mca_last_price")]
public virtual System.Nullable<System.Decimal> mca_last_price
{
get { return _mca_last_price; }
set
{
if (_mca_last_price != value)
{
this.OnPropertyChanging("mca_last_price", _mca_last_price, value);
_mca_last_price = value;
}
}
}
private System.Nullable<System.Decimal> _mca_logistic_minimum_value;
[Column("mca_logistic_minimum_value")]
public virtual System.Nullable<System.Decimal> mca_logistic_minimum_value
{
get { return _mca_logistic_minimum_value; }
set
{
if (_mca_logistic_minimum_value != value)
{
this.OnPropertyChanging("mca_logistic_minimum_value", _mca_logistic_minimum_value, value);
_mca_logistic_minimum_value = value;
}
}
}
private System.Nullable<System.Decimal> _mca_logistic_minimum_mplt;
[Column("mca_logistic_minimum_mplt")]
public virtual System.Nullable<System.Decimal> mca_logistic_minimum_mplt
{
get { return _mca_logistic_minimum_mplt; }
set
{
if (_mca_logistic_minimum_mplt != value)
{
this.OnPropertyChanging("mca_logistic_minimum_mplt", _mca_logistic_minimum_mplt, value);
_mca_logistic_minimum_mplt = value;
}
}
}
private System.Nullable<System.Decimal> _mca_logistic_minimum_qty;
[Column("mca_logistic_minimum_qty")]
public virtual System.Nullable<System.Decimal> mca_logistic_minimum_qty
{
get { return _mca_logistic_minimum_qty; }
set
{
if (_mca_logistic_minimum_qty != value)
{
this.OnPropertyChanging("mca_logistic_minimum_qty", _mca_logistic_minimum_qty, value);
_mca_logistic_minimum_qty = value;
}
}
}
private System.Nullable<System.Decimal> _mca_req_kj_percent;
[Column("mca_req_kj_percent")]
public virtual System.Nullable<System.Decimal> mca_req_kj_percent
{
get { return _mca_req_kj_percent; }
set
{
if (_mca_req_kj_percent != value)
{
this.OnPropertyChanging("mca_req_kj_percent", _mca_req_kj_percent, value);
_mca_req_kj_percent = value;
}
}
}
private System.Nullable<System.Decimal> _mca_min_order_qty;
[Column("mca_min_order_qty")]
public virtual System.Nullable<System.Decimal> mca_min_order_qty
{
get { return _mca_min_order_qty; }
set
{
if (_mca_min_order_qty != value)
{
this.OnPropertyChanging("mca_min_order_qty", _mca_min_order_qty, value);
_mca_min_order_qty = value;
}
}
}
private System.Byte _mca_default_contractor;
[Column("mca_default_contractor", AllowNull = false)]
public virtual System.Byte mca_default_contractor
{
get { return _mca_default_contractor; }
set
{
if (_mca_default_contractor != value)
{
this.OnPropertyChanging("mca_default_contractor", _mca_default_contractor, value);
_mca_default_contractor = value;
}
}
}
}
}
}