public DetailDto getMaterialType(String id)
        {
            material_type type = db.material_type.Where(s => s.id == id).FirstOrDefault();
            DetailDto     dto  = new DetailDto(type.id, type.name);

            return(dto);
        }
 public static DetailMaterialType_M ToViewModel(material_type type)
 {
     return(new DetailMaterialType_M()
     {
         materialtypeid = type.materialtypeid,
         typename = type.typename,
         description = type.description
     });
 }