public Response itemSequence(string token, [FromBody] itemSequence menu) { Response response = new Response(); if (string.IsNullOrEmpty(token) || !token.Equals(_token)) { response.code = "404"; response.message = "Invalid token"; } else { var data = MenuDataHelper.itemSequence(menu); if (data == null) { response.code = "500"; response.message = "Invalid token"; } else { response.code = "200"; response.content = data; } } return(response); }
public static List <itemSequence> itemSequence(itemSequence menu) { try { List <itemSequence> itemSequence = factory.itemSequence(menu); if (itemSequence == null) { throw new Exception("DAL.SupplierList is null"); } return(itemSequence); } catch (Exception ex) { LogHelper.WriteLog(new Log() { message = ex.Message }, "recipe"); return(null); } }