public ActionResult <IEnumerable <MaterialsView> > Get() { try { var materials = db.GetAll().ToList(); return(materials); } catch (Exception ex) { return(BadRequest(ex)); } }