public DeliveryCharge add(DeliveryCharge delivery)
 {
     logger.Info("start deliverycharge");
     try
     {
         var identity = User.Identity as ClaimsIdentity;
         int compid = 0, userid = 0;
         // Access claims
         foreach (Claim claim in identity.Claims)
         {
             if (claim.Type == "compid")
             {
                 compid = int.Parse(claim.Value);
             }
             if (claim.Type == "userid")
             {
                 userid = int.Parse(claim.Value);
             }
         }
         logger.Info("User ID : {0} , Company Id : {1}", compid, userid);
         var del = context.AddUpdateDeliveryCharge(delivery);
         return(del);
     }
     catch (Exception ex)
     {
         logger.Error("Error in deliverycharge" + ex.Message);
         logger.Info("End  deliverycharge: ");
         return(null);
     }
 }