示例#1
0
 public IActionResult Get(string inputHex)
 {
     return(TryCreateResult(() =>
     {
         var model = sgtinFactory.CreateFromHex(inputHex);
         return new OkObjectResult(model);
     }));
 }
示例#2
0
        public bool Compare(string inputHex, string name)
        {
            var tag  = repository.SearchBySpec(name).FirstOrDefault();
            var item = factoryService.CreateFromHex(inputHex);

            if (tag == default(SgtinData))
            {
                return(false);
            }
            if (item.ItemReference == tag.ItemReference)
            {
                return(true);
            }
            return(false);
        }