public static LoadCarrierTableEntity ToTableEntity(this LoadCarrierEntity loadCarrierEntry)
 {
     return(new LoadCarrierTableEntity()
     {
         PartitionKey = loadCarrierEntry.ContainerId, // ContainerID
         RowKey = loadCarrierEntry.UId,               // UID
         LCyear = loadCarrierEntry.LCyear,
         LCmonth = loadCarrierEntry.LCmonth,
         LoggedTime = loadCarrierEntry.LoggedTime,
         Location = loadCarrierEntry.Location,
         Plant = loadCarrierEntry.Plant,
         LoadInDays = loadCarrierEntry.LoadInDays,
         WBS = loadCarrierEntry.WBS
     });
 }
        public static List <LoadCarrierEntity> dynamicToloadCarrierEntity(dynamic bodyData)
        {
            List <LoadCarrierEntity> loadCarriers = new List <LoadCarrierEntity>();

            foreach (var loadCarrierObj in bodyData)
            {
                LoadCarrierEntity loadCarrier = new LoadCarrierEntity()
                {
                    ContainerId = bodyData.ContainerId,
                    LCyear      = convertToInt(bodyData.LCyear),
                    LCmonth     = convertToInt(bodyData.LCmonth),
                    Location    = bodyData.Location,
                    Plant       = bodyData.Plant,
                    LoadInDays  = convertToInt(bodyData.LoadInDays),
                    WBS         = bodyData.WBS
                };

                loadCarriers.Add(loadCarrier);
            }

            return(loadCarriers);
        }
        public async Task <TableResult> insertItem(LoadCarrierEntity loadCarrier)
        {
            TableResult tr = await table.InsertorReplace(Mappings.ToTableEntity(loadCarrier), tableName);

            return(tr);
        }