Exemple #1
0
        public object addEntity(EntityAddDto entityAddDto)
        {
            MySqlCommand insertCommand = new MySqlCommand("insert into entity(entityName) values(@entityName)");

            insertCommand.Parameters.AddWithValue("@entityName", entityAddDto.entityName);
            int row = dBAccess.executeQuery(insertCommand);

            if (row < 0)
            {
                throw new Exception();
            }
            else
            {
                SuccessResponse successResponse = new SuccessResponse();
                return(successResponse);
            }
        }
Exemple #2
0
        public object addEntity(EntityAddDto entityAddDto)
        {
            object response = entityService.addEntity(entityAddDto);

            return(response);
        }