public ActionResult <TypeOfPostCreationConfirmationDto> CreateType([FromBody] TypeOfPostCreationDto type)
 {
     try
     {
         var typeOfPost = autoMapper.Map <TypeOfPost>(type);
         TypeOfPostCreatedConfirmation createdType = typeService.CreateType(typeOfPost);
         return(StatusCode(201, createdType));
     } catch (Exception ex)
     {
         return(StatusCode(500, ex.Message));
     }
 }
        public TypeOfPostCreatedConfirmation CreateType(TypeOfPost Type)
        {
            TypeOfPostCreatedConfirmation type = typeRepository.CreateType(Type);

            return(type);
        }