public ActionResult <Materials> GetByCode(string code) { try { return(db.GetByCode(code)); } catch (Exception) { throw; } }