1
Vote

Domain model collection instantiation required

description

Under solution.WMSNet.Model.Models you will find our models, these models require the ICollection Property to be instantiated within a constructor.

eg.
public partial class Area:TrackableEntity
{
    [Key]
    public int AreaID { get; set; }
    public int Version { get; set; }
    public string Name { get; set; }
    public bool UseForGoodsIn { get; set; }
    public bool UseForGoodsOut { get; set; }
    public bool UseForPicking { get; set; }
    public bool UseForReplenish { get; set; }
    public bool UseForStorage { get; set; }
    public bool UseForTransfer { get; set; }
    public int ClientID { get; set; }
    public virtual Client Client { get; set; }
    public virtual ICollection<StorLoc> StorLoc { get; set; }
}
Should be.

public partial class Area:TrackableEntity
{

    public Area()
    {
        StorLoc = new List<StorLoc>();
    }

    [Key]
    public int AreaID { get; set; }
    public int Version { get; set; }
    public string Name { get; set; }
    public bool UseForGoodsIn { get; set; }
    public bool UseForGoodsOut { get; set; }
    public bool UseForPicking { get; set; }
    public bool UseForReplenish { get; set; }
    public bool UseForStorage { get; set; }
    public bool UseForTransfer { get; set; }
    public int ClientID { get; set; }
    public virtual Client Client { get; set; }
    public virtual ICollection<StorLoc> StorLoc { get; set; }
}

comments

Ra3aHa5nain wrote Jun 3, 2014 at 8:52 PM

Any questions please do not hesitate to ask.

Ra3aHa5nain wrote Jun 4, 2014 at 9:20 PM

Hi, kxinyu i have re-assigned the task to you. The task is extremely simple, unit tests will not be required, if you have questions please do not hesitate to ask.

Ra3aHa5nain wrote Jun 5, 2014 at 6:24 PM

Hi tyndo, welcome to the project. I have reassigned item 7 to you,
if you have any questions please do not hesitate to contact me.

If you could please do at least 5 to 8 models it will be greatly appreciated.

The task is very simple, each collection within the models require instantiation.

Look forward to your commits.

Thank you.