public IActionResult Get(string inputHex) { return(TryCreateResult(() => { var model = sgtinFactory.CreateFromHex(inputHex); return new OkObjectResult(model); })); }
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); }