public static ProductPackagingType Map(this tblProductPackagingType productPackagintType) { ProductPackagingType ppt = new ProductPackagingType(productPackagintType.id) { Name = productPackagintType.name, Description=productPackagintType.description, Code=productPackagintType.code //_Status = productPackagintType.active }; ppt._SetDateCreated(productPackagintType.IM_DateCreated); ppt._SetDateLastUpdated(productPackagintType.IM_DateLastUpdated); ppt._SetStatus((EntityStatus)productPackagintType.IM_Status); return ppt; }
protected Guid AddProductPackagingType(string name, string desc, string code) { ProductPackagingType ppt = new ProductPackagingType(Guid.NewGuid()) { Name = name, Description = desc, Code=code }; ppt._SetStatus(EntityStatus.Active); return _productPackagingTypeRepository.Save(ppt); }