parameters: (cls, dto: MappingIssueCategoryDTO)
return_statement: return new_category.id
docstring: Creates a new MappingIssueCategory class from dto
docstring_summary: Creates a new MappingIssueCategory class from dto
docstring_tokens: Creates a new MappingIssueCategory class from dto
function: def create_from_dto(cls, dto: MappingIssueCategoryDTO) -> int:
          """ Creates a new MappingIssueCategory class from dto """
          new_category = cls(dto.name)
          new_category.description = dto.description
  
          db.session.add(new_category)
          db.session.commit()
  
          return new_category.id
function_tokens: def create_from_dto ( cls , dto : MappingIssueCategoryDTO ) -> int : new_category = cls ( dto . name ) new_category . description = dto . description db . session . add ( new_category ) db . session . commit ( ) return new_category . id